Project and add geolocated data grid to current map axes
surfacem(lat,lon,Z)
surfacem(latlim,lonlim,Z)
surfacem(lat,lon,Z,alt)
surfacem(...,prop1,val1,prop2,val2,...)
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.
Note
Unlike meshm
and surfm
, surfacem
always
adds a surface to the current axes, regardless of hold state.
Load elevation raster data and a geographic cells reference object. Then, display the data as a surface.
load topo60c 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, topo60c) demcmap(topo60c)