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.

pcolorPurpose2pcolorPseudocolor plotSyntaxpcolor(C)pcolor(X,Y,C)h = pcolor(...)Description A pseudocolor plot is a rectangular array of cells with colors determined by C.<strong>MATLAB</strong> creates a pseudocolor plot by using each set of four adjacent points inC to define a surface patch (i.e., cell).pcolor(C) draws a pseudocolor plot. The elements of C are linearly mapped toan index into the current colormap. The mapping from C to the currentcolormap is defined by colormap and caxis.pcolor(X,Y,C) draws a pseudocolor plot of the elements of C at the locationsspecified by X and Y. The plot is a logically rectangular, two-dimensional gridwith vertices at the points [X(i,j), Y(i,j)]. X and Y are vectors or matricesthat specify the spacing of the grid lines. If X and Y are vectors, X correspondsto the columns of C and Y corresponds to the rows. If X and Y are matrices, theymust be the same size as C.h = pcolor(...) returns a handle to a surface graphics object.RemarksA pseudocolor plot is a flat surface plot viewed from above. pcolor(X,Y,C) isthe same as viewing surf(X,Y,0*Z,C) using view([0 90]).When you use shading faceted or shading flat, the constant color of each cellis the color associated with the corner having the smallest x-y coordinates.Therefore, C(i,j) determines the color of the cell in the ith row and jth column.The last row and column of C are not used.When you use shading interp, each cell’s color results from a bilinearinterpolation of the colors at its four vertices and all elements of C are used.2-346

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

Saved successfully!

Ooh no, something went wrong!