How to increase the length of the legend line?

137 次查看(过去 30 天)
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);

回答(2 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018-4-21
编辑:Walter Roberson 2020-9-8
  4 个评论
Luca Menegozzo
Luca Menegozzo 2020-11-28
编辑:Luca Menegozzo 2020-11-28
The best solution to the problem without extra functions. Thank you!

请先登录,再进行评论。


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

类别

Help CenterFile Exchange 中查找有关 Legend 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by