legend at a desired location on a plot

9 visualizaciones (últimos 30 días)
Megha
Megha el 7 de En. de 2019
Comentada: Star Strider el 7 de En. de 2019
How to put legend on a deisred location i.e desired x,y points in matlab?
In a plot of
X = 1:10;
Y = 1:10;
plot(X,Y);
legend([5,5],'linear')
I want legend at the centre of the plot at [x,y] = [5,5]
Is there any way to ge it?
I do not want legend orienattaion and locataions like 'SouthWest','SouthWestOutside'... and so on....
  1 comentario
madhan ravi
madhan ravi el 7 de En. de 2019
Editada: madhan ravi el 7 de En. de 2019
text() perhaps? , I think legend can not be specified at a certain point expect the options that you posted

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 7 de En. de 2019
Use the 'Position' (link) property of legend.
It does not work exactly as you would like it to, however you apparently can put it anywhere in the figure window.
  2 comentarios
Megha
Megha el 7 de En. de 2019
Yes, it worked! Thanks @Star Strider
Star Strider
Star Strider el 7 de En. de 2019
As always, my pleasure!

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