Matlab的SUBPLOT的图像大小调整

解决方法:

(1)subplot的子窗口都是固定的,其设置是内置的默认值,你可以通过axes函数来重新规定子窗口的大小和位置。如:
axes('position',[.1  .1  .8  .6])
mesh(peaks(20));
axes('position',[.1  .7  .8  .2])
pcolor([1:10;1:10]);


(2)另外,subplot其实也可以设定子窗口的大小和位置

SUBPLOT('position',[left bottom width height]) creates an  axis at the specified position in normalized coordinates 

( in the range from 0.0 to 1.0).


(3)也可以在画出的图上通过edit下拉菜单下的命令进行调整

或点击上边的箭头,使图处于编辑状态,直接对轴进行调整


使用axes控制(取代subplot)
ex
rgb = imread('ngc6543a.jpg');
axes('position',[0  0  .5  1]); image(rgb);
axes('position',[.5  0  .5  1]); im = mean(rgb,3); image(im); colormap(hot(256))


subplot(2, 3, 2);

set(gca, 'Units', 'normalized', 'Position', [0.505 0.505 0.495 0.495])

你可能感兴趣的:(matlab基础学习)