VIRIDIS

Purpose:

Generates a colormap of dark blue, green, yellow.

Syntax:

VIRIDIS(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)');viridis

 

image\viridis.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 dark blue (lowest) to green to yellow.

Example:

W1: cividis;showcmap()

W2: gouldian;showcmap()

W3: paruline;showcmap()

W4: viridis;showcmap()

 

image\cvpg.png

 

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

Remarks:

viridis by itself sets the colormap and shading.

 

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

 

The VIRIDIS colormap is a perceptually uniform, sequential colormap that transitions from dark purple through blue, teal, green and yellow. It’s designed so equal steps in data correspond to equal steps in perceived color change

 

See CIVIDIS for a modified version of this colormap.

 

See INFERNO, MAGMA, and PLASMA for more perceptually uniform colormaps.

See Also:

CIVIDIS

COOL

GOULDIAN

HOT

INFERNO

MAGMA

PARULINE

PINK

PLASMA

RAINBOW

SETCOLORMAP

SETSHADING

SHOWCMAP

TURBO