充满3
Filled 3-D polygons
Syntax
Fill3(x,y,z,c)
充满3(X,Y,Z,ColorSpec)
充满3(X1,Y1,Z1,C1,X2,Y2,Z2,C2,...)
fill3(...,'propertyname',propertyValue)
充满3(ax,...)
h = fill3(...)
Description
The充满3
function creates flat-shaded and Gouraud-shaded polygons.
Fill3(x,y,z,c)
填充三维多边形。X
,Y
, 和Z
triplets specify the polygon vertices. IfX
,Y
, orZ
is a matrix,充满3
创造npolygons, wherenis the number of columns in the matrix.充满3
通过在必要时将最后一个顶点连接到第一个顶点来关闭多边形。价值X
,Y
, 和Z
can be numeric, datetime, duration, or categorical values.
C
指定颜色,在哪里C
is a vector or matrix of indices into the current colormap. IfC
is a row vector,length(C)
must equalsize(X,2)
和尺寸(y,2)
; ifC
is a column vector,length(C)
must equalsize(X,1)
和尺寸(y,1)
.
充满3(X,Y,Z,ColorSpec)
充满s the polygons with the color specified byColorSpec
, which can be one of the following values:
A color name or a short name:
'red'
(or'r'
),'green'
(or'g'
),'blue'
(or'b'
),'青色'
(or'c'
),'品红'
(or'M'
),'yellow'
(or'y'
),'black'
(or'k'
),'white'
(or'w'
).An RGB triplet specified as a 1-by-3 vector whose elements are the intensities of the red, green, and blue components of a color. The intensities must be in the range [0, 1]. For example,
[0.7 0.8 1]
specifies light blue.
充满3(X1,Y1,Z1,C1,X2,Y2,Z2,C2,...)
specifies multiple filled three-dimensional areas.
fill3(...,'propertyname',propertyValue)
allows you to set values for specific patch properties.
充满3(ax,...)
创造the polygons in the axes specified byax
而不是当前轴(gca
). The optionax
可以在前一个语法中之前在任何输入参数组合之前。
h = fill3(...)
returns a vector of patch objects.
Examples
算法
IfX
,Y
, 和Z
是相同大小的矩阵,充满3
从相应的元素中形成顶点X
,Y
, 和Z
(all from the same matrix location), and creates one polygon from the data in each column.
IfX
,Y
, orZ
is a matrix,充满3
replicates any column vector argument to produce matrices of the required size.
If you specify color using theColorSpec
争论,充满3
generates flat-shaded polygons and sets the patch objectFaceColor
property to an RGB triplet.
If you specify color usingC
,充满3
缩放元素CLim
通过轴属性CLim
, which specifies the color axis scaling parameters, before indexing the current colormap.
IfC
is a row vector,充满3
generates flat-shaded polygons and sets theFaceColor
property of the patch objects to'flat'
. Each element becomes theCData
property value for the respective patch object.
IfC
is a column vector or a matrix,充满3
generates polygons with interpolated colors and sets the patch objectFaceColor
property to'interp'
.充满3
使用一条线ar interpolation of the vertex colormap indices when generating polygons with interpolated colors. The elements in one column become theCData
property value for the respective patch object. IfC
is a column vector,充满3
复制列向量以产生所需的大小矩阵。