我正在使用worldmap
创建一个带有设置lat和lon限制的地图。 MATLAB使用什么投影来创建图形? Mathworks只是说它会自动选择一个合理的'投影。
这是我使用的代码:
figure('visible','off');
%%% Set the map boundaries
hi_lat=55;
lo_lat=24.5;
hi_lon=-54.0 ;
lo_lon=-128.0;
%%% Plot
worldmap ([lo_lat hi_lat], [lo_lon hi_lon]) % lat and lon bounds of your plot
geoshow('landareas.shp','FaceColor', 'none', 'EdgeColor', [0 0 0])
framem off; gridm off; mlabel off; plabel off
hold on
states = shaperead('usastatelo', 'UseGeoCoords', true,...
'Selector',...
{@(name) ~any(strcmp(name,{'Alaska','Hawaii'})), 'Name'});
geoshow(states,'FaceColor', 'none', 'EdgeColor', [0 0 0])
答案 0 :(得分:0)
将worldmap
设为等于变量,然后尝试getm
h = worldmap ([lo_lat hi_lat], [lo_lon hi_lon]) % lat and lon bounds of your plot
geoshow('landareas.shp','FaceColor', 'none', 'EdgeColor', [0 0 0])
framem off; gridm off; mlabel off; plabel off
hold on
states = shaperead('usastatelo', 'UseGeoCoords', true,...
'Selector',...
{@(name) ~any(strcmp(name,{'Alaska','Hawaii'})), 'Name'});
geoshow(states,'FaceColor', 'none', 'EdgeColor', [0 0 0])
getm(h,'MapProjection')