필터 지우기
필터 지우기

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