Legend on MATLAB FIGURES
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am exporting my MATLAB figures into PDF format. I have altered the size of the figures but when I do so the legend on my graph is too big for the new size. How can I make the legend smaller so it fits nicely into the new graph. Also how can I change the size of the writing. I am using export settings?
0 Kommentare
Antworten (3)
Thorsten
am 6 Jul. 2015
h = legend(... % your code here
set(h, 'FontSize', 8); % reduce font size used in legend
2 Kommentare
Azzi Abdelmalek
am 6 Jul. 2015
t=0:0.1:10;
y1=sin(t);
y2=cos(t);
plot(t,y1,t,y2);
leg={'leg1','leg2'},
hleg=legend(leg);
set(hleg,'fontsize',6)
1 Kommentar
Azzi Abdelmalek
am 6 Jul. 2015
Bearbeitet: Azzi Abdelmalek
am 6 Jul. 2015
To get the legend handle
t=0:0.1:10;
y1=sin(t);
y2=cos(t);
plot(t,y1,t,y2);
leg={'leg1','leg2'},
legend(leg);
h=findobj(gcf,'type','legend')
set(h,'fontsize',20)
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!