图例:
plot(x,sin(x),’.b’,x,cos(x),’+r’)
legend(‘sin’,’cos’)这样可以把”.”标识为’sin’,把”+”标识为”cos”
Matlab图例设置_dosper19...图例中字体及大小legend({‘k’,‘a’,‘e’},‘fontsize’,10,‘fontname’,‘Times New Roman’); %注意图例内容需用大括号括起来
图例中各个量及位置:...,自动放置在最佳位置
1——放置在放置在图形的右上角 top right
2——放置在图形的左上角 top left
3——放置在图形的左下角 bottom left
4——放置在图形的右下角 bottom...right
-1——放置在图形视窗的外右边
legend('\alpha_1','\alpha_1','\alpha_1','location','SouthEast')
NorthEast:右上角...% 图例中 设置 线段 的 长短 以适应图形的大小
leg =legend(‘k’,‘a’,‘e’);
leg.ItemTokenSize =[10,1];
%去除图例的矩形框
leg =legend