SETPMAP

Purpose:

Converts palette colors to colormap values.

Syntax:

SETPMAP(c1, c2, c3, ..., cN)

cN

-

A list of integers, the palette colors.

Returns:

A Nx3 colormap or if no return value is requested, shades the current Window with the specified colors.

Example:

W1: density(spline2(rand(10), 5))

setpmap(blue, lblue, red, lred, yellow)

colorbar

 

image\setpmappic.gif

 

Creates a 46x46 density plot and shades the image with colors of blue, light blue, red, light red and yellow. The image is divided into 5 equal slices and shaded with the specified colors. The COLORBAR function adds a color legend to the plot.

Remarks:

SETPMAP accepts the same color values as SETPALETTE , however SETPMAP creates an RGB colormap that can be used to shade images, surface and 2D plots and is preferred over SETPALETTE.

 

Palette colors are specified in the file PALETTE.MAC.

 

See DEFCOLOR to dynamically define a new color.

See Also:

COLORBAR

DEFCOLOR

GETCOLORMAP

GETCRANGE

SETCOLORMAP

SETPALETTE

SETSHADING