码迷,mamicode.com
首页 > 其他好文 > 详细

MATLAB—地图

时间:2017-09-15 22:35:31      阅读:338      评论:0      收藏:0      [点我收藏+]

标签:use   经纬   code   png   lan   mat   show   style   image   

一、画亚洲地图

1、worldmap()

(1)

clear all
worldmap(‘World‘)

技术分享

clear all
worldmap(‘World‘)%世界地图
load coast %载入海岸线
plotm(lat,long)%经纬度

技术分享

(2)

clear all
ax = worldmap(‘World‘);
setm(ax, ‘Origin‘, [0 180 0])%更改经度,从0到180再到0
land = shaperead(‘landareas‘, ‘UseGeoCoords‘, true);%陆地
geoshow(ax, land, ‘FaceColor‘, [0.5 0.7 0.5])

技术分享

 

clear all
ax = worldmap(‘World‘);
setm(ax, ‘Origin‘, [0 180 0])%更改经度,从0到180再到0
land = shaperead(‘landareas‘, ‘UseGeoCoords‘, true);
geoshow(ax, land, ‘FaceColor‘, [0.5 0.7 0.5])
lakes = shaperead(‘worldlakes‘, ‘UseGeoCoords‘, true);
geoshow(lakes, ‘FaceColor‘, ‘blue‘)
rivers = shaperead(‘worldrivers‘, ‘UseGeoCoords‘, true);
geoshow(rivers, ‘Color‘, ‘blue‘)
cities = shaperead(‘worldcities‘, ‘UseGeoCoords‘, true);
geoshow(cities, ‘Marker‘, ‘.‘, ‘Color‘, ‘red‘)

技术分享

land = shaperead(‘landareas‘, ‘UseGeoCoords‘, true)%陆地  后者参数x,y为经纬度
geoshow(land, ‘FaceColor‘, [0.5 0.7 0.5])

技术分享

 

MATLAB—地图

标签:use   经纬   code   png   lan   mat   show   style   image   

原文地址:http://www.cnblogs.com/ruo-li-suo-yi/p/7528554.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!