Colormap to plot, specified as a three-column matrix of RGB triplets. An
RGB triplet is a three-element row vector whose elements specify the
intensities of the red, green, and blue components of a color. The
intensities must be in the range [0, 1]. For example, here is a colormap
that contains five colors:
This table lists the RGB triplet values for common colors.
Color
RGB Triplet
yellow
[1 1 0]
magenta
[1 0 1]
cyan
[0 1 1]
red
[1 0 0]
green
[0 1 0]
blue
[0 0 1]
white
[1 1 1]
black
[0 0 0]
Alternatively, you can create the matrix by calling one of the predefined
colormap functions. Call the function as the input argument to the
rgbplot function. For example, this command plots
the parula
colormap.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: United States.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.