How do you place text in same position of 12 subplots?
Mostrar comentarios más antiguos
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
Respuestas (4)
Sanjay Manohar
el 22 de Sept. de 2018
text( 0.5,0.5,'Hi','Units','Normalized' )
Walter Roberson
el 8 de Jun. de 2012
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
el 8 de Jun. de 2012
0 votos
What's wrong with the text() function?
3 comentarios
Walter Roberson
el 8 de Jun. de 2012
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
el 8 de Jun. de 2012
Image Analyst
el 8 de Jun. de 2012
I was thinking that you would have the axes the same every time, like you had called xlim() and ylim().
andrew joros
el 8 de Jun. de 2012
0 votos
Categorías
Más información sobre Axis Labels en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!