DADiSP Worksheet Functions > S - Z > SETCRANGE

 

SETCRANGE

Purpose:

Sets color shading to a specific range.

Syntax:

SETCRANGE(loval, hival)

loval

-

A real, the lowest shade value.

hival

-

A real, the highest shade value.

Returns:

Nothing.

Example:

(x, y) = fxyvals(-1, 1, 0.1, -1, 1, 0.1)

W1: cos(x*y);setplotstyle(0);setplottype(4)

setcrange(0.5, 2);

W2: W1;rainbow

W3: 2*W1;rainbow

 

image\setcrangpic.gif

 

W2 and W3 contain a shaded 3D surfaces. The color range is scaled to Z values from 0.5 to 2.0. The surface in W2 shows the portion of the color map that corresponds to the Z values of W2. Since the Z values of W3 are different from W2, a different set of colors is displayed.

Remarks:

By default, a surface is shaded such that all the colors of a color map are used. SETCRANGE sets a restricted range of colors to be mapped such that the same Z values of different surfaces are mapped to the same color.

 

Use setcrange() (no arguments) to remove the color range.

 

See GETCRANGE to return the color range.

See Also:

COLORBAR

COOL

GETCOLORMAP

GETCRANGE

HOT

RAINBOW

SETCOLORMAP

SETSHADING