This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Project and add geolocated data grid to current map axes


h = surfacem(...)


surfacem(lat,lon,Z) constructs a surface to represent the data grid Z in the current map axes. The surface lies flat in the horizontal plane with its CData property set to Z. The vectors or 2-D arrays lat and lon 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.

surfacem(latlim,lonlim,Z) defines the graticule using the latitude and longitude limits latlim and lonlim. These limits should match the geographic extent of the data grid Z. The two-element vector latlim has 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'.

surfacem(lat,lon,Z,alt) sets the ZData property of the surface to 'alt', resulting in a 3-D surface. Lat and lon must result in a graticule mesh that matches alt in size. CData is set to Z. Facecolor is 'texturemap', unless Z matches alt in size, in which case it is 'flat'.

surfacem(...,prop1,val1,prop2,val2,...) applies additional MATLAB® graphics properties to the surface via property/value pairs. You can specify any property accepted by the surface function, except XData, YData, and ZData.

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


Unlike meshm and surfm, surfacem always adds a surface to the current axes, regardless of hold state.


Construct a surface to represent the data grid topo.

		load topo
    latlim = [-90  90];
    lonlim = [  0 360];
    gratsize = 1 + [diff(latlim), diff(wrapTo360(lonlim))]/6;
    [lat, lon] = meshgrat(latlim, lonlim, gratsize);
    worldmap world
    surfacem(lat, lon, topo)

See Also

| | |

Introduced before R2006a