plot函数
常用参数
- markersize, 调整标记大小
- linewidth, 调整线宽
调整图片初始大小位置
set(gcf,'position',[10,10,2000,2000]) % 从屏幕的坐标(10,10)跨到(2000,2000)
画子图
subplot(2,3,4) % 2行3列, 第四个图
坐标轴
坐标轴范围
axis equal % 坐标轴等比例
axis([-2,3,-1.5,inf]) % x从-2到3, y下限是-1.5, 上限自动(设为inf)
坐标轴标签
xlabel('$P_{\phi}/\psi_{w}$','FontSize',16,'interpreter','latex')
interpreter可以选择latex
, tex
, none
添加图例
legend('legend1','legend2',...)
图例和plot的顺序一一对应.
如果不想显示某个plot的图例, 给这个plot一个句柄, 然后关闭这个句柄的图例
a = plot(x3,y3,'k-',x3,z3,'k-',u3,s3,'k-',v3,r3,'k-',t3,w3,'k-','LineWidth',1);
set(a,'handlevisibility','off');
为图添加注释
text(x,y,'comment')
添加标题
title('your title', 'interpreter', 'none')
保存当前图片
saveas(gcf, 'path')
可以保存为png或fig文件