登录论坛

查看完整版本 : MATLAB子图边距


poster
2019-12-10, 20:48
我正在使用subplot命令绘制5 x 3的图,但是每个子图周围都有大量的边距。

如何控制它们周围的边距大小?

figure; for c=1:15 subplot(5,3,c); imagesc(reshape(image(:,c), 360,480)); colormap gray; axis image; end https://i.stack.imgur.com/mUmxR.png



回答:

问题是Matlab分配了每个轴的position属性,以便每个图周围都有空间。您可以调整position属性,也可以从File Exchange获取子轴 (http://www.mathworks.com/matlabcentral/fileexchange/3696-subaxis-subplot) ,并按自己的方式设置子图。



更多&回答... (https://stackoverflow.com/questions/4410873)