How do you place text in same position of 12 subplots?
显示 更早的评论
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
2018-9-22
text( 0.5,0.5,'Hi','Units','Normalized' )
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
2012-6-8
0 个投票
What's wrong with the text() function?
3 个评论
Walter Roberson
2012-6-8
text() always uses data coordinates, so if the data ranges are not the same it becomes trickier to place things in the same position.
andrew joros
2012-6-8
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().
类别
在 帮助中心 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!