M_Map 與其他圖一起subplot時(shí)比例失調(diào)問題

當(dāng)使用M_Map工具包在subplot中繪制地圖時(shí),會(huì)出現(xiàn)地圖非常小的情況。為了解決這個(gè)問題,可以設(shè)置subplot axes的position屬性,將地圖子圖放大,同時(shí)將其他子圖略微縮小即可。地圖子圖的寬度或者高度可以擴(kuò)大1.8倍,但是其占用面積也就擴(kuò)大到與其他子圖相當(dāng)?shù)拿娣e。以下為示例代碼,具體設(shè)置用...代替了。

figure,
% set map subfigure position
ax=subplot(1,3,1);hold on;
left=ax.Position(1);
bottom=ax.Position(2);
width=ax.Position(3);
height=ax.Position(4);
ax.Position=[left-width*0.3,bottom,width*1.8,height];%move leftward and expand the width 
m_proj(...);
m_grid(...);
m_coast('color','k');
% set other subfigure position
ax=subplot(1,3,2);hold on;
left=ax.Position(1);
bottom=ax.Position(2);
width=ax.Position(3);
height=ax.Position(4);
ax.Position=[left+width*0.2,bottom,width*0.8,height];%move rightward
plot(...);
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容