DADiSP Worksheet Functions > Function Categories > Colors > SETPMAP
Converts palette colors to colormap values.
SETPMAP(c1, c2, c3, ..., cN)
cN |
- |
A list of integers, the palette colors. |
A Nx3 colormap or if no return value is requested, shades the current Window with the specified colors.
W1: density(spline2(rand(10), 5))
setpmap(blue, lblue, red, lred, yellow)
colorbar
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.
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.