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

    %% Change Projection Updating Meridian and Parallel Labels
% This example shows how to change the projection of a map and update the 
% meridian and parallel labels.
%%
% Create a Mercator projection with meridian and parallel labels.

% Copyright 2015 The MathWorks, Inc.

axesm mercator
framem on; gridm on; mlabel on; plabel on
setm(gca,'LabelFormat','signed')
axis off
%%
% Get the default map and frame latitude limts for the Mercator projection.
% Note that both the frame and map latitude limits are set to 86 degrees 
% north and south for the Mercator projection to maintain a safe distance 
% from the singularity at the poles.
[getm(gca,'MapLatLimit'); getm(gca,'FLatLimit')]
%%
% Switch the projection to an orthographic azimuthal.
setm(gca,'MapProjection','ortho')
%%
% Specify new locations for the meridian and parallel labels.
setm(gca,'MLabelParallel',0,'PLabelMeridian',-90, ...
   'PLabelMeridian',-30)