Matlab legend换行 多个legend 阵列排布
作者:互联网
目标:把4个图例弄成2X2的出现在图中
x = linspace(0,pi);
y1 = cos(x);
plot(x,y1)
hold on
y2 = cos(2*x);
plot(x,y2)
y3 = cos(3*x);
plot(x,y3)
y4 = cos(4*x);
plot(x,y4)
hold off
legend({'cos(x)','cos(2x)','cos(3x)','cos(4x)'},'Location','northwest','NumColumns',2)
标签:plot,cos,Matlab,排布,y1,y3,y2,legend 来源: https://blog.csdn.net/weixin_41957433/article/details/120463804