06467e858846ee7be2287e46437adf2e Matlab绘制子图subplot使用攻略 - 指南生活

Matlab绘制子图subplot使用攻略

2025-05-20 07:13:43

我们在sci论文的写作过程中通常遇到多个子图画在同一张图上,这篇文档将通过多个程序算例详细介绍Matlab绘制子图subplot使用攻略

Matlab绘制子图subplot使用攻略

2、例如:复制一下程序到matlab窗口figuret=0:0.001:1;y1=sin(10*t);y2=sin(15*t);y3=sin(20*t); y4=sin(25*t);subplot(2,2,1)plot(t,y1,'--r*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,1)'},... 'FontSize',14,'HorizontalAlignment','center')subplot(2,2,2)plot(t,y2,'--b*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,2)'},... 'FontSize',14,'HorizontalAlignment','center')subplot(2,2,3)plot(t,y2,'--b*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,3)'},... 'FontSize',14,'HorizontalAlignment','center')subplot(2,2,4)plot(t,y2,'--r*','linewidth',2,'markersize',5)text(.5,.5,{'subplot(2,2,4)'},... 'FontSize',14,'HorizontalAlignment','center')程序编译结果如右图所示

Matlab绘制子图subplot使用攻略

2、例如:复制一下程序到matlab窗口figuret=0:0.001:1;y1=sin(10*t);y2=sin(15*t);y3=sin(20*t); y4=sin(25*t);subplot(2,2,[1 3])plot(t,y1,'--r*','linewidth',2,'markersize',5)subplot(2,2,2)plot(t,y2,'--b*','linewidth',2,'markersize',5)subplot(2,2,4)plot(t,y2,'--r*','linewidth',2,'markersize',5)程序编译结果如右图所示

Matlab绘制子图subplot使用攻略

4、例如:复制一下程序到matlab窗口figuret=0:0.001:1;y1=sin(10*t);y2=sin(15*t);y3=sin(20*t); y4=sin(25*t);subplot(2,2,[1 2])plot(t,y1,'--r*','linewidth',2,'markersize',5)subplot(2,2,3)plot(t,y2,'--b*','linewidth',2,'markersize',5)subplot(2,2,4)plot(t,y2,'--r*','linewidth',2,'markersize',5)程序编译结果如右图所示

Matlab绘制子图subplot使用攻略
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢