![](/matlabcentral/answers/uploaded_files/114094/33.jpg)
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);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/187949/image.png)
回答(2 个)
KALYAN ACHARJYA
2018-4-21
编辑:Walter Roberson
2020-9-8
I don't think it is customizable directly, go to the following links to user-defined function-
4 个评论
Luca Menegozzo
2020-11-28
编辑:Luca Menegozzo
2020-11-28
The best solution to the problem without extra functions. Thank you!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!