M_Map 与其他图一起subplot时比例失调问题

当使用M_Map工具包在subplot中绘制地图时,会出现地图非常小的情况。为了解决这个问题,可以设置subplot axes的position属性,将地图子图放大,同时将其他子图略微缩小即可。地图子图的宽度或者高度可以扩大1.8倍,但是其占用面积也就扩大到与其他子图相当的面积。以下为示例代码,具体设置用...代替了。

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(...);
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容