怎么用matlab画地图 200
算了。这种平台热烈程度比较一般。绝望。 展开
使用worldmap+geoshow命令绘制中国地图。直接写入如下代码:
figure(3)
subplot(2,2,1);
worldmap('China'); mapshow(fnshp_L,'Color','k');
subplot(2,2,2);
worldmap([0,55],[70,140]); mapshow(fnshp_P,'FaceColor',[0.5,1.0,0.5]);
setm(gca,'MLineLocation',10);
setm(gca,'PLineLocation',10);
setm(gca,'MLabelLocation',20);
setm(gca,'PLabelLocation',10);
subplot(2,2,3);
worldmap('China'); geoshow(fnshp_L,'Color','k');
subplot(2,2,4);
worldmap([0,55],[70,140]); geoshow(fnshp_P,'FaceColor',[0.5,1.0,0.5]);
setm(gca,'MLineLocation',10);
setm(gca,'PLineLocation',10);
setm(gca,'MLabelLocation',20);
setm(gca,'PLabelLocation',10);
title('中国地图','FontSize',14,'FontWeight','Bold')
其中worldmap([0,55],[70,140])为设置显示纬度经度范围;setm(gca,'MLineLocation',10)为设置经度间隔;setm(gca,'PLineLocation',10)为设置纬度间隔;setm(gca,'MLabelLocation',20)为设置经度标签每隔几度;setm(gca,'PLabelLocation',10)为设置纬度标签每隔几度。