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

    %% Create UTM Maps with the axesm Function
% You can create UTM maps with |axesm| , just like any
% other projection. However, unlike other projections, the map frame is
% limited to an 8-by-6 degree map window (the UTM zone).
%%
% Create a UTM map axes.
axesm utm
%%
% Get the map axes properties and inspect them in the Command Window or
% with the Variables editor. Note that the default zone is 31N. This is
% selected because the map origin defaults to |[0 3 0]| , which is on the
% equator and at a longitude of 3° E. This is the center longitude of
% zone 31N, which has a latitude limit of |[0 8]| , and a longitude limit
% of |[0 6]|.
h = getm(gca);
h.zone
%%
% Change the zone to 32N, one zone to the east of the default, and inspect
% the other parameters again. Note that the map origin and limits are
% adjusted for zone 32N.
setm(gca,'zone','32n')
h = getm(gca);
%%
% Draw the map grid and label it.
setm(gca,'grid','on','meridianlabel','on','parallellabel','on')
%%
% Load and plot the coastline data set to see a close-up
% of the Gulf of Guinea and Bioko Island in UTM.
load coastlines
plotm(coastlat,coastlon)