DADiSP Worksheet Functions > Function Categories > Colors > GETCRANGE

 

GETCRANGE

Purpose:

Gets color shading range.

Syntax:

GETCRANGE(valflag)

(loval, hival, set) = GETCRANGE()

valflag

-

Optional. A real, which value to return. If not specified, returns 1 if color range set else 0.

0:

get loval

1:

get hival

loval

-

A real. Lowest shade value.

hival

-

A real. Highest shade value.

set

-

A real. Returns 1 if color range set else 0.

Returns:

A real as determined by valflag.

 

(loval, hival, set) = getcrange() returns color range and setting flag.

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

 

(lo, hi) = getcrange()

 

lo == 0.5

hi == 2.0

 

W2 contains 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. GETCRANGE returns the color range specified by SETCRANGE.

Remarks:

See SETCRANGE to specify a constrained color range.

See Also:

COLORBAR

COOL

GETCOLORMAP

HOT

RAINBOW

SETCOLORMAP

SETCRANGE