figure
pause

h1=subplot(2,2,1);%画将窗口分成2行2列的第一个子区域
plot(1,1);
title('1');
pause

h2=subplot(2,2,2);
plot(1,1);
title('2');
pause

h3=subplot(2,2,[3 4]);
plot(1,1)
title('3');
pause

set(h1,'color',[1 0 0])%更改第一个子区域的颜色为红色
pause
set(h2,'color',[0 1 0])
pause
set(h3,'color',[0 0 1])
pause

subplot(h1)%将第一个子区域设置为当前操作区域
title('The first subplot')%更改第一个子区域的标题
pause
axis([0 10 0 20])%更改第一个子区域的坐标范围
pause

close all

 

程序执行的结果:

 

posted on 2017-01-19 15:24  乐在其中流砥柱  阅读(122)  评论(0编辑  收藏  举报