DADiSP Worksheet Functions > Function Categories > Colors > SETCOLORMAP
Sets the colormap for density and shaded plots.
SETCOLORMAP(map)
map |
- |
An Nx3 array of RGB (red, green blue) triples. |
Nothing.
all = (0..255)/255
zip = zeros(255, 1);
map1 = ravel(all, all, all);
map2 = ravel(all, zip, all);
map3 = ravel(all, all, zip);
setcolormap(map1);showcmap();
creates and displays a black to white colormap.
setcolormap(map2);showcmap();
creates and displays a black to magenta colormap.
setcolormap(map2);showcmap();
creates and displays a black to yellow colormap.
The colormap must be an array of N rows by 3 columns where 1 <= N <= 255. Each individual RGB (red, green, blue) value is a real number ranging from 0 to 1.0.
See DEFCOLOR to define a single color.