12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

fillPurpose2fillFilled two-dimensional polygonsSyntaxDescriptionfill(X,Y,C)fill(X,Y,ColorSpec)fill(X1,Y1,C1,X2,Y2,C2,...)fill(...,'PropertyName',PropertyValue)h = fill(...)The fill function creates colored polygons.fill(X,Y,C) creates filled polygons from the data in X and Y with vertex colorspecified by C. C is a vector or matrix used as an index into the colormap. If C isa row vector, length(C) must equal size(X,2) and size(Y,2); if C is a columnvector, length(C) must equal size(X,1) and size(Y,1). If necessary, fillcloses the polygon by connecting the last vertex to the first.fill(X,Y,ColorSpec) fills two-dimensional polygons specified by X and Y withthe color specified by ColorSpec.fill(X1,Y1,C1,X2,Y2,C2,...) specifies multiple two-dimensional filledareas.fill(...,'PropertyName',PropertyValue) allows you to specify propertynames and values for a patch graphics object.h = fill(...) returns a vector of handles to patch graphics objects, onehandle per patch object.RemarksIf X or Y is a matrix, and the other is a column vector with the same number ofelements as rows in the matrix, fill replicates the column vector argument toproduce a matrix of the required size. fill forms a vertex from correspondingelements in X and Y and creates one polygon from the data in each column.The type of color shading depends on how you specify color in the argument list.If you specify color using ColorSpec, fill generates flat-shaded polygons bysetting the patch object’s FaceColor property to the corresponding RGB triple.If you specify color using C, fill scales the elements of C by the values specifiedby the axes property CLim. After scaling C, C indexes the current colormap.2-192

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!