Filled 3-D polygons
fill3(X,Y,Z,C)
fill3(X,Y,Z,ColorSpec
)
fill3(X1,Y1,Z1,C1,X2,Y2,Z2,C2,...)
fill3(...,'PropertyName
',PropertyValue)
fill3(ax,...)
h = fill3(...)
The fill3
function creates flat-shaded
and Gouraud-shaded polygons.
fill3(X,Y,Z,C)
fills three-dimensional
polygons. X
, Y
, and Z
triplets
specify the polygon vertices. If X
, Y
,
or Z
is a matrix, fill3
creates n polygons,
where n is the number of columns in the matrix. fill3
closes
the polygons by connecting the last vertex to the first when necessary.
The values in X
, Y
, and Z
can
be numeric or datetime or duration values.
C
specifies color, where C
is
a vector or matrix of indices into the current colormap. If C
is
a row vector, length(C)
must equal size(X,2)
and size(Y,2)
;
if C
is a column vector, length(C)
must
equal size(X,1)
and size(Y,1)
.
fill3(X,Y,Z,
fills
three-dimensional polygons defined by ColorSpec
)X
, Y
,
and Z
with color specified by ColorSpec
.
fill3(X1,Y1,Z1,C1,X2,Y2,Z2,C2,...)
specifies
multiple filled three-dimensional areas.
fill3(...,'
allows
you to set values for specific patch properties.PropertyName
',PropertyValue)
fill3(ax,...)
creates the polygons in the
axes specified by ax
instead of in the current
axes (gca
). The option ax
can
precede any of the input argument combinations in the previous syntaxes.
h = fill3(...)
returns
a vector of patch objects.