Matlab将文本添加到图的外部

use*_*320 5 matlab text figure

如何在图的右侧添加文本?我想调整绘图的大小,在右边留一些空白区域并在那里添加一些信息.

谢谢!!

zac*_*618 16

如果要将该文本放在图例中,可以执行以下操作:

legend('Some quick information','location','EastOutside')
Run Code Online (Sandbox Code Playgroud)

这是最简单的.但是,为了进行更多控制,您可以在图窗口中放置一个文本框:

MyBox = uicontrol('style','text')
set(MyBox,'String','Here is a lot more information')
Run Code Online (Sandbox Code Playgroud)

并移动它:

set(MyBox,'Position',[xpos,ypos,xsize,ysize])
Run Code Online (Sandbox Code Playgroud)