Changing size label in xline

74 visualizaciones (últimos 30 días)
Miquel Vega
Miquel Vega el 10 de Mayo de 2021
Comentada: Star Strider el 10 de Mayo de 2021
Hi,
I have a plot where I have added some vertical lines with the xline function. I also have some labels on this vertical lines. However, I would like to display the labels in a bigger size, but I don't know how to do it. I have checked the documentation on xline and can't find any option regarding the size of the label.
I would appreciate if you could indicate me how to do it.
Thanks for your help :)

Respuesta aceptada

Star Strider
Star Strider el 10 de Mayo de 2021
Try this —
x = linspace(0,6,100);
y = exp(x);
plot(x,y)
hxl = xline(4.5,'-',{'Acceptable','Limit'});
x = linspace(0,6,100);
y = exp(x);
plot(x,y)
hxl = xline(4.5,'-',{'Acceptable','Limit'});
hxl.FontSize = 25;
Example copied from the xline documentation.
  2 comentarios
Miquel Vega
Miquel Vega el 10 de Mayo de 2021
Thanks!!!
That worked fantastically :)
Star Strider
Star Strider el 10 de Mayo de 2021
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Axis Labels en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by