Name

fill — Display 2-D filled polygons with pseudo-color

Calling Sequence

hdl = fill(X,Y,C)

Parameter

X

m by n matrix

Y

m by n matrix

C

1 by n matrix or m by n matrix

hdl

Handle of the created Fac3d entity

Description

fill(X,Y,C) displays 2D filled m-vertices polygons. When C is a vector then C(i) gives the value for polygon i. The actual color is computed by mapping the minimum and maximum value of C to the RBG colormap of the current figure. The actual scale can be controlled by the 'caxis' property.

When X,Y and C are matrices of the same size, the color is given by the first vertex of each polygon or interpolated, depending on the 'shading' property.

Examples

x=[0 1 1 0]';y=[0 0 1 1]';c=[1 2 3 4]';
fill([x 1+x x],[y y 1+y],[c 2+c 3+c],'facecolor','interp');
axis equal

Screenshot

See Also

fill , surf , colormap , shading , caxis , colorbar

Authors

Stéphane Mottelet