Generates a black & white colormap.
GRAY(len)
len |
- |
Optional. An integer, the colormap length. Defaults to the length of the current colormap. |
A table of RGB triples suitable for the SETCOLORMAP function.
clen = length(getcolormap());
density(ravel(rep(0..(clen-1), 32), clen)');gray;

creates a table of 32 x N (where N == colormap length) RBG values and displays the resulting colors. The resulting image is a vertical plot of colors ranging from black (lowest) to white (highest).
W1: bone;showcmap()
W2: gray;showcmap()

W1 displays a gray scale colormap and W2 displays a modified gray scale colormap with blue tints.
gray by itself sets the colormap and shading.
a = gray or setcolormap(gray) returns the RGB values. In this case, use SETSHADING to make the new colormap take effect on an existing density or 2D plot.
The GRAY colormap varies smoothly from black to white.
See BONE for a similar gray scale colormap but with blue tints.