SETCOLORMAP

Purpose:

Sets the colormap for density and shaded plots.

Syntax:

SETCOLORMAP(map)

map

-

An Nx3 array of RGB (red, green blue) triples.

Returns:

Nothing.

Example:

all = (0..255)/255

zip = zeros(256, 1);

 

map1 = ravel(all, all, all);

map2 = ravel(all, zip, all);

map3 = ravel(all, all, zip);

map4 = ravel(zip, all, all);

 

W1: setcolormap(map1);showcmap();

W2: setcolormap(map2);showcmap();

W3: setcolormap(map3);showcmap();

W4: setcolormap(map4);showcmap();

 

image\setcmap.png

 

W1 creates and displays a black to white colormap.

 

W2 creates and displays a black to magenta colormap.

 

W3 creates and displays a black to yellow colormap.

 

W4 creates and displays a black to cyan colormap.

 

Example:

W1: setshading("black", "white");showcmap()

W2: setshading("black", "magenta");showcmap()

W3: setshading("black", "yellow");showcmap()

W4: setshading("black", "lcyan");showcmap()

 

image\setshade1.png

 

Same as above, except the colormaps are generated directly by SETSHADING using color names.

Remarks:

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.

 

See SETSHADING to create colormaps by linearly spaning between two or more colors by name.

Remarks:

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.

 

See SETSHADING to create colormaps by linearly spanning between two or more colors by name.

 

The following built-in colormaps are available:

 

AUTUMN

Red, orange, yellow colormap

BONE

Blue tinted gray scale colormap

CIVIDIS

Blue, green, yellow colormap

COOL

Shades of blue

COPPER

Shades of copper colormap

FLAG

Repeating red, orange, yellow, green, blue, violet colormap.

GOULDIAN

Blue, green, yellow colormap

GRAY

Black & white colormap

HOT

Black, red, yellow, white colormap

HSV

Red, yellow, green, cyan, blue, magenta, red colormap

INFERNO

Magenta, red, yellow colormap

MAGMA

Magenta, red, yellow colormap

PARULA

Blue, green, yellow colormap

PINK

Black, red, yellow, white light colormap

PLASMA

Magenta, red, yellow colormap

PRISM

Repeating red, orange, yellow, green, blue, violet colormap.

RAINBOW

Visible color spectrum colormap

SPRING

Magenta, pink, yellow colormap

SUMMER

Green to yellow colormap

TURBO

Red, blue, green, yellow colormap

VIRIDIS

Blue, green, yellow colormap

WINTER

Blue to green colormap

See Also:

AUTUMN

CIVIDIS

COOL

COPPER

DEFCOLOR

FLAG

GETCOLORMAP

GETCRANGE

GRAY

HOT

INFERNO

RAINBOW

SETCRANGE

SETPALETTE

SETPMAP

SETSHADING

SHOWCMAP