SETCOLOR

Purpose:

Sets the color of a series in a Window.

Syntax:

SETCOLOR(win, color, item, index)

win

-

Optional. One or more Window references. Defaults to the current Window.

color

-

An integer. Any pre-defined macro name or integer for a supported color.

item

-

Optional. An integer, the item to set. Defaults to 1, the primary series.

index

-

Optional. An integer, the series to set. Defaults to 1, the first series.

Example:

W1: gnorm(100,1)

W2: w1*w1;overplot(w1)

W3: ravel(W1, w2)

 

setcolor(W2, lred, 2)

setcolor(W3, lred, 1, 2)

 

sets the second series in W2 and W3 to light red.

 

W2 contains two items, the original series and the overplotted series. The statement setcolor(W2, lred, 2) sets the color of the second item, the overplot.

 

W3 contains one item that is comprised of two columns of data. The statement setcolor(W3, lred, 1, 2) sets the color of the second series in the first item. I.e. column 2.

Example:

setcolor(W2, lgreen)

setcolor(W3, lgreen)

 

The first or primary series of W2 is set to light green. Because W3 is comprised of one multi-column item, all the series of W3 are set to light green.

Example:

setcolor(W1.., lgreen)

 

Sets the series in all Windows to light green.

Remarks:

The range of colors available is machine-dependent. The color names shown in the example are actually pre-defined macros representing some of the colors available on any color machine.

 

For a list of colors, use the MACROS function.

 

See COLORSTR to convert a color name into a color index.

 

See GETCOLOR to returns a series color.

See Also:

COLORSTR

DEFCOLOR

GETCOLOR

SERCOLOR

WEBCOLORS

WINCOLOR