Subplot - adding alpha-numeric data

1 次查看(过去 30 天)
Tom
Tom 2012-4-19
I have a 2x3 subplot with 4 graphs in 1,2,4,5 with 3 and 6 empty for the results I want to add. I was wondering whether it is possible, and if so how, to input this text on the side?
Any help would be greatly appreciated.

回答(2 个)

Rick Rosson
Rick Rosson 2012-4-19
>> doc text
>> doc title
>> doc xlabel
>> doc ylabel
>> doc uicontrol
  2 个评论
Tom
Tom 2012-4-19
hmm, how would I implement a text or uicontrol so that it goes in the upper right hand quadrant?
Rick Rosson
Rick Rosson 2012-4-20
What have you tried so far? Did you review the documentation and try to come up with some code that does what you want? If so, did it work?

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2012-4-20
text() can only specify data coordinates. There are no data coordinates that will always mean "upper right hand quadrant", so the position of text() is always going to depend upon the current axis limits, zoom, and pan.
uicontrol() can use 'Units', 'normalized', with coordinates [1 1] to mean the upper right corner. In such a case, though, the coordinates would be relative to the containing object (most often a figure): uicontrol cannot be contained within an axes. You can thus use uicontrol() to create text that has a set position relative to the figure, but not a set position relative to an axes border, other than coincidentally. I am assuming here that you do not want the uicontrol() to be exactly the same size as the axes (in which case you could use linkprop() to force them to maintain the same position and size.)
You might be able to get a little further towards consistent placement by inserting both the uicontrol and the axes into a uipanel(), perhaps.
But perhaps all you need is to title() or ylabel() the subplots ??

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by