Borrar filtros
Borrar filtros

How to increase the length of the legend line?

157 visualizaciones (últimos 30 días)
Felix
Felix el 21 de Abr. de 2018
Comentada: xuewei li el 25 de Mzo. de 2022
Hello, I would like to increase the length (not linewidth) of the line inside the legend. Does anyone has an idea? Thanks you.
t = [0:0.1:2*pi]
a = sin(t);
b = cos(t);
plot(t,a,t,b,'linewidth',3)
l = legend({'Sinus','Cosinus'},...
'location','southwest','FontName','TimesNewRoman','FontSize',20);

Respuestas (2)

KALYAN ACHARJYA
KALYAN ACHARJYA el 21 de Abr. de 2018
Editada: Walter Roberson el 8 de Sept. de 2020
  4 comentarios
Luca Menegozzo
Luca Menegozzo el 28 de Nov. de 2020
Editada: Luca Menegozzo el 28 de Nov. de 2020
The best solution to the problem without extra functions. Thank you!
Tin Truong Chanh
Tin Truong Chanh el 13 de En. de 2021
thank you Arpan Sircar

Iniciar sesión para comentar.


xuewei li
xuewei li el 25 de Mzo. de 2022
leg = legend('1','2','3');
leg.ItemTokenSize = [x1,x2];

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by