How do you place text in same position of 12 subplots?

조회 수: 9 (최근 30일)
andrew joros
andrew joros 2012년 6월 8일
답변: Sanjay Manohar 2018년 9월 22일
I am trying to place some text in the same position of 12 subplots (4x3). How can this be done? I have googled with no luck :(
Thanks

답변 (4개)

Sanjay Manohar
Sanjay Manohar 2018년 9월 22일
text( 0.5,0.5,'Hi','Units','Normalized' )

Walter Roberson
Walter Roberson 2012년 6월 8일
Suppose RelX and RelY are the relative position at which you want to plot the text, 0 to 1 each, starting from bottom left corner of the inside of the axis. Then, for any one plot,
DataX = interp1( [0 1], xlim(), RelX );
DataY = interp1( [0 1], ylim(), RelY );
text(DataX, DataY, 'Your String')

Image Analyst
Image Analyst 2012년 6월 8일
What's wrong with the text() function?
  댓글 수: 3
andrew joros
andrew joros 2012년 6월 8일
When I use text() the placement of the text changes with every subplot which is a scatter-plot in this case. I am trying to make the position absolute (e.g. keep all text in the top-left of each subplot) but I dont know how.
Image Analyst
Image Analyst 2012년 6월 8일
I was thinking that you would have the axes the same every time, like you had called xlim() and ylim().

댓글을 달려면 로그인하십시오.


andrew joros
andrew joros 2012년 6월 8일
How do I make the position absolute?

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by