www.gusucode.com > map 案例源码 matlab代码程序 > map/CreateCylindricalProjectionUsingMapLimitPropertiesExample.m

    %% Create Cylindrical Projection Using Map Limit Properties
% This example shows how to create cylindrical projection using map limit 
% properties. 
%%
% Load the coastline data.
load coastlines
%%
% Construct a Mercator projection covering the full range of permissible
% latitudes with longitudes covering a full 360 degrees starting at 60
% West. The call to axesm above is equivalent to:
% |axesm('mercator','Origin',[0 120 0],'FlatLimit',[-90 90],...|
%        |'FLonLimit',[-180 180])| . 
figure('Color','w')
axesm('mercator','MapLatLimit',[-90 90],'MapLonLimit',[-60 300])
axis off; 
framem on; 
gridm on; 
mlabel on; 
plabel on;
setm(gca,'MLabelLocation',60)
geoshow(coastlat,coastlon,'DisplayType','polygon')
%%
% Verify this by checking these properties.
getm(gca,'Origin')
getm(gca,'FLatLimit')
getm(gca,'FLonLimit')
%%
% Note that the map and frame limits are clamped to the range of |[-86 86]|
% imposed by the readonly |TrimLat| property. 
getm(gca,'MapLatLimit')
getm(gca,'FLatLimit')
getm(gca,'TrimLat')