【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.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章