【Matlab】subplot调整子图间距

参考链接:
1、http://blog.sina.com.cn/s/blog_7e18707801017pin.html

使用matlab的subplot画图有时候需要调整子图间距,主要有下面两种方法:
1、subplot子图使用plot,plot3,surf,mesh有坐标轴的可以直接使用箭头拖动,这样最快捷。如下图:
在这里插入图片描述2、有时候imshow不能拖动,只能使用subplot(‘Position’,[left bottom width height]) 或者set(gca, ‘Position’,[left bottom width height]) 需要自己设置Position这个四维向量。如下图:
在这里插入图片描述 subplot(‘Position’,[left bottom width height]) creates an axes at the position specified by a four-element vector. left, bottom, width, and height are in normalized coordinates in the range from 0.0 to 1.