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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Patch PropertiesThe second diagram illustrates the use of true color. True color requiresm-by-n-by-3 arrays to define red, green, and blue components for each color.Single ColorOne ColorPer FaceOne ColorPer VertexCDataBGRRGBCDataRedBlueGreen[X,Y,Z]Data[X,Y,Z]DataCDataFace1Face2Face3Face4Face5[X,Y,Z]DataNote that if CData contains NaNs, <strong>MATLAB</strong> does not color the faces.See also the Faces, Vertices, and FaceVertexCData properties for analternative method of patch definition.CDataMapping{scaled} | directDirect or scaled color mapping. This property determines how <strong>MATLAB</strong>interprets indexed color data used to color the patch. (If you use true colorspecification for CData or FaceVertexCData, this property has no effect.)• scaled – transform the color data to span the portion of the colormapindicated by the axes CLim property, linearly mapping data values to colors.See the caxis command for more information on this mapping.• direct – use the color data as indices directly into the colormap. When notscaled, the data are usually integer values ranging from 1 to2-327

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

Saved successfully!

Ooh no, something went wrong!