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
程序执行的结果:
浙公网安备 33010602011771号