Primitive surface plot
surface(
creates a primitive, three-dimensional surface plot. The function plots the
values in matrix X
,Y
,Z
)Z
as heights above a grid in the
x-y plane defined by
X
and Y
. The color of the surface
varies according to the heights specified by Z
.
Unlike the surf
function, the primitive
surface
function does not call newplot
before plotting and
does not respect the value of the NextPlot
property for the
figure or axes. Instead, it adds the surface plot to the current axes without
deleting other graphics objects or resetting axes properties.
surface(
creates a primitive
surface plot and uses the column and row indices of the elements in
Z
)Z
as the x- and
y-coordinates.
surface(
plots
into the axes specified by ax
,___)ax
instead of the current axes.
Specify the axes as the first input argument.
surface(___,
specifies surface properties using one or more name-value pair arguments. For
example, Name,Value
)'FaceAlpha',0.5
creates a semitransparent
surface.
s = surface(___)
returns the chart primitive
surface object. Use s
to modify the surface after it is
created. For a list of properties, see Surface Properties.