PRISM

Purpose:

Generates a repeating red, orange, yellow, green, blue, violet colormap.

Syntax:

PRISM(len)

len

-

Optional. An integer, the colormap length. Defaults to the length of the current colormap.

Returns:

A table of RGB triples suitable for the SETCOLORMAP function.

Example:

clen = length(getcolormap());

W1: density(ravel(rep(0..(clen-1), 32), clen)');sety(0, 12);prism

 

image\prism.png

 

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 the repeating discrete colors red, orange, yellow, green, blue and violet.

Example:

W1: flag;showcmap();sety(0, 31)

W2: prism;showcmap();sety(0, 31)

 

image\fpmap.png

 

W1 and W2 display discrete, repeating 32x256 colormaps where 256 is the colormap length.

Remarks:

prism by itself sets the colormap and shading.

 

a = prism or setcolormap(prism) returns the RGB values. In this case, use SETSHADING to make the new colormap take effect on an existing density or 2D plot.

 

The PRISM colormap is a repeating, rainbow-like cycle of six primary/bright colors, designed to maximize hue distinction.

See Also:

COOL

FLAG

HOT

HSV

PINK

RAINBOW

SETCOLORMAP

SETSHADING

SHOWCMAP