Change Font Size of Legends in Matlab
已有 2095 次阅读|
2011-8-11 11:33
|个人分类:Matlab
In order to change the font size for a MATLAB legend, use the SET
command to change the 'FontSize' property of the legend object, as in
the example below.
plot(rand(4))
h_legend=legend('One','Two','Three','Four');
set(h_legend,'FontSize',14);
In MATLAB 7.1 (R14SP3), saving the figure to file after changing
the Font Size on the legend may revert the font sizes to the original
size. To work around this, the following option can be used from the
Command Window to print the figure to a file :
print -dbmp16m 'myfig.jpg'
(In fact i did not meet the second problem, i used print -depsc vgssweep_gmid_vgs.eps to print the figure to a eps file, and it worked well)