Main Content


Project regular data grid in z = 0 plane on axesm-based map


h = pcolorm(...)


pcolorm(lat,lon,Z) constructs a surface to represent the data grid Z in the current axesm-based map. The surface lies flat in the horizontal plane with its CData property set to Z. Lat and lon are vectors or 2-D arrays that define the latitude-longitude graticule mesh on which Z is displayed. For a complete description of the various forms that lat and lon can take, see surfm. If the hold state is 'off', pcolorm clears the current map.

pcolorm(latlim,lonlim,Z) defines the graticule using the latitude and longitude limits latlim and lonlim. These limits should match the geographic extent of Z, the data grid. Latlim is a two-element vector of the form:

[southern_limit northern_limit]

Likewise, lonlim has the form:

[western_limit eastern_limit]

A latitude-longitude graticule of size 50-by-100 is constructed. The surface FaceColor property is 'texturemap', except when Z is precisely 50-by-100, in which case it is 'flat'.

pcolorm(...,prop1,val1,prop2,val2,...) applies additional MATLAB® graphics properties to the surface via property/value pairs. Any property accepted by the surface may be specified, except for XData, YData, and ZData.

h = pcolorm(...) returns a handle to the surface object.


Load elevation raster data and a geographic cells reference object. Then, display the data as a surface.

load topo60c
axesm miller
axis off
framem on
gridm on
[topo60c,topo60cR] = geocrop(topo60c,topo60cR,[-90 90],[-180,180]);
[lat,lon] = geographicGrid(topo60cR);


This function warps a data grid to a graticule mesh, which is projected according to the axesm-based map property MapProjection. The fineness, or resolution, of this grid determines the quality of the projection and the speed of plotting it. There is no hard and fast rule for sufficient graticule resolution, but in general, cylindrical projections need fewer graticule points in the longitudinal direction than do complex curve-generating projections.

Version History

Introduced before R2006a