How to increase the length of the legend line?

235 Ansichten (letzte 30 Tage)
Felix
Felix am 21 Apr. 2018
Kommentiert: xuewei li am 25 Mär. 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);

Antworten (2)

KALYAN ACHARJYA
KALYAN ACHARJYA am 21 Apr. 2018
Bearbeitet: Walter Roberson am 8 Sep. 2020
  4 Kommentare
Luca Menegozzo
Luca Menegozzo am 28 Nov. 2020
Bearbeitet: Luca Menegozzo am 28 Nov. 2020
The best solution to the problem without extra functions. Thank you!
Tin Truong Chanh
Tin Truong Chanh am 13 Jan. 2021
thank you Arpan Sircar

Melden Sie sich an, um zu kommentieren.


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

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by