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.

pcolorA simple color wheel illustrates a polar coordinate system.n = 6;r = (0:n)'/n;theta = pi*(–n:n)/n;X = r*cos(theta);Y = r*sin(theta);C = r*cos(2∗theta);pcolor(X,Y,C)axis equal tight10.80.60.40.20−0.2−0.4−0.6−0.8−1−1 −0.5 0 0.5 1AlgorithmSee AlsoThe number of vertex colors for pcolor(C) is the same as the number of cellsfor image(C). pcolor differs from image in that pcolor(C) specifies the colorsof vertices, which are scaled to fit the colormap; changing the axes climproperty changes this color mapping. image(C) specifies the colors of cells anddirectly indexes into the colormap without scaling. Additionally,pcolor(X,Y,C) can produce parametric grids, which is not possible with image.caxis, image, mesh, shading, surf, view2-348

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

Saved successfully!

Ooh no, something went wrong!