matlab多条曲线绘制在一张表格——设置绘图曲线类型、plot设置名称、坐标轴范围和精度

坐标轴设置

//设置坐标轴的数字大小,包括legend文字大小:
set(gca,'FontSize',18);

//xy坐标轴范围和精度
set(gca,'xlim',[1,81],'xtick',[1:10:81]);
set(gca,'ylim',[0,1],'ytick',[0:0.1:1]);

//xy轴内容和字体大小
xlabel('Measuring point','FontSize',25);
ylabel('Magnetic field value/nT','FontSize',25);

plot绘图线型

plot(x1,'r');
plot(x2,'b');
plot(x3,'g');

//设置曲线名称
legend("induced field","W-SA-WOA","GA","WOA");

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_43641765/article/details/114547118
今日推荐