prism
Colormap that repeats the six colors red, orange, yellow, green, blue and violet.
Category: Graphics > Formatting and Annotation
Syntax
map = prism
Returns a prism colormap with the default number of rows.
map = prism(m)
Returns a prism colormap with m rows.
Description
The sequence of six spectral colors is repeated until m rows are filled. Because neighboring values get very different colors, the map exposes small differences and bands in data, such as the contour lines of a smooth surface, but it is not suitable to show magnitudes.
Input arguments
m- Number of colors, a nonnegative integer.
Output arguments
mapm-by-3 matrix of RGB values between 0 and 1.
Example
Four colors
prism(4)
Output
ans = 4×3
1.0000 0 0
1.0000 0.5000 0
1.0000 1.0000 0
0 1.0000 0