Set/get the RGB colormap of currently active figure
c = colormap(M)
n by 3 matrix or a string
n by 3 matrix
colormap(M) sets the current figure's colormap to M.
M = colormap() retrieves the current colormap. The values are in the range from 0 to 1. M is a m x 3 matrix. m is the number of colors. Color number i is given as a 3-uple M(i,1), M(i,2), M(i,3) corresponding respectively to red, green and blue intensity. For example, [0 0 0] is black, [1 1 1] is white, [1 0 0] is pure red, [.5 .5 .5] is gray, and [127/255 1 212/255] is aquamarine.
When M is a string, M can take the values
'hot', 'gray', 'copper', 'cool', 'bone', 'red','green', 'blue', jet'
The colormap is used by macros which produce pseudocolor patches, such as pcolor, tripcolor, surf, trisurf, surfl, trisurfl.
pcolor(rand(10,10)); colormap gray | ![]() | ![]() |
Add here the function bibliography
Add here the Scilab, C,... used code references