Borrar filtros
Borrar filtros

How to position added text in the graph at the upper right corner of the graph?

209 visualizaciones (últimos 30 días)
str(1)= sprintf(bearingType,bType);
str(2)= sprintf(bearingSpeed,current_N);
str(3)= sprintf(reliability, re);
str = {str(1),str(2),str(3)};
text(2,7,str)

Respuestas (1)

dpb
dpb el 15 de Mzo. de 2019
Editada: dpb el 6 de Dic. de 2021
xL=xlim;
yL=ylim;
text(0.99*xL(2),0.99*yL(2),str,'HorizontalAlignment','right','VerticalAlignment','top')
  2 comentarios
Gerben Erens
Gerben Erens el 6 de Dic. de 2021
good solution, but you have the order of arguments wrong for text. Should be
text(0.99*xL(2),0.99*yL(2),str,'HorizontalAlignment','right','VerticalAlignment','top')

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by