Automatically Position Text Annotations on a plot.

32 visualizaciones (últimos 30 días)
Nathaniel
Nathaniel el 23 de En. de 2013
Comentada: Arsalan Aftab Sayed el 5 de Feb. de 2021
I am plotting many different plots in a for loop.
Is there any way to automatically position my text in the top right corner of the plot in all of the plots?
text('location','northeast','string1')
The line above does not seem to work.
Any ideas?

Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 23 de En. de 2013
ylim=get(gca,'ylim');
xlim=get(gca,'xlim')
text(xlim(1),ylim(2),'yourtext')
  2 comentarios
Nathaniel
Nathaniel el 23 de En. de 2013
thanks for you input!
Arsalan Aftab Sayed
Arsalan Aftab Sayed el 5 de Feb. de 2021
can we avoid overlapping of text

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by