HSV

Purpose:

Generates a red, yellow, green, cyan, blue, magenta, red colormap.

Syntax:

HSV(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)');hsv

 

image\hsv.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 colors ranging from blue (lowest) to red (highest).

Example:

W1: hsv;showcmap();

W2: rainbow;showcmap();

W3: turbo;showcmap()

 

image\hrt.png

 

W1, W2 and W3 display similar 32x256 colormaps where 256 is the colormap length.

Remarks:

hsv by itself sets the colormap and shading.

 

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

 

HSV creates a colormap by linearly varying the hue portion of a colormap where the saturation and lightness components remain constant.

See Also:

COOL

HOT

PINK

RAINBOW

SETCOLORMAP

SETSHADING

SHOWCMAP

TURBO