colormap函数
标签:
matlab |
Set and get the current colormap
Syntax
Description
A colormap is
an map(k,:) = [r(k) g(k) b(k)])
colormap(map) sets the colormap to the
matrix map. If any values
in map Colormap must have values in
[0,1].
colormap('default') sets
the current colormap to the default colormap.
cmap =
colormap retrieves the
current colormap. The values returned are in the interval [0
1].
Specifying Colormaps
M-files in
the color
creates
an hsv
Supported Colormaps
MATLAB supports a number of built-in
colormaps, illustrated and described below. In addition to
specifying built-in colormaps programmatically, you can use
the
The named built-in colormaps are the following:
http://matlab.izmiran.ru/help/techdoc/ref/colormap.gif
autumnvaries smoothly from red, through orange, to yellow. boneis a grayscale colormap with a higher value for the blue component. This colormap is useful for adding an "electronic" look to grayscale images. colorcubecontains as many regularly spaced colors in RGB colorspace as possible, while attempting to provide more steps of gray, pure red, pure green, and pure blue. coolconsists of colors that are shades of cyan and magenta. It varies smoothly from cyan to magenta. coppervaries smoothly from black to bright copper. flagconsists of the colors red, white, blue, and black. This colormap completely changes color with each index increment. grayreturns a linear grayscale colormap. hotvaries smoothly from black through shades of red, orange, and yellow, to white. hsvvaries the hue component of the hue-saturation-value color model. The colors begin with red, pass through yellow, green, cyan, blue, magenta, and return to red. The colormap is particularly appropriate for displaying periodic functions. hsv(m)is the same as hsv2rgb([h ones(m,2)])where his the linear ramp, h = (0:m-1)'/m.jetranges from blue to red, and passes through the colors cyan, yellow, and orange. It is a variation of the hsvcolormap. The jetcolormap is associated with an astrophysical fluid jet simulation from the National Center for Supercomputer Applications. See the "Examples" section. linesproduces a colormap of colors specified by the axes ColorOrderproperty and a shade of gray. pinkcontains pastel shades of pink. The pink colormap provides sepia tone colorization of grayscale photographs. prismrepeats the six colors red, orange, yellow, green, blue, and violet. springconsists of colors that are shades of magenta and yellow. summerconsists of colors that are shades of green and yellow. whiteis an all white monochrome colormap. winterconsists of colors that are shades of blue and green.
Examples
The images and colormaps
demo, imagedemo, provides an
introduction to colormaps. Select pcolor hsv
The rgbplot rgbplot(hsv), rgbplot(gray),
and rgbplot(hot).
The following commands display
the flujet jet
-
load
flujet image(X) colormap(jet)
http://matlab.izmiran.ru/help/techdoc/ref/graph12b.gif
The demos
-
load spine
image(X) colormap bone
http://matlab.izmiran.ru/help/techdoc/ref/bone_spi.gif
Algorithm
Each figure has its
own Colormap colormap
See Also
brighten, caxis, colormapeditor, colorbar, contrast, hsv2rgb, pcolor, rgb2hsv, rgbplot
The Colormap
Color
Operations
Coloring
Mesh and Surface Plots

加载中…