DADiSP Worksheet Functions > Function Categories > Colors > GETCOLOR
Returns the color of a series.
GETCOLOR(series, item, index)
series |
- |
Optional. A series. Defaults to the current Window. |
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 of the item. |
An integer, the series color.
W1: gnorm(100,1)
W2: w1*w1;overplot(w1)
W3: ravel(W1, w2)
setcolor(W2, lred, 2);
setcolor(W3, lred, 1, 2);
color1 = strcolor(getcolor(w2));
color2 = strcolor(getcolor(w2, 2, 1));
color3 = strcolor(getcolor(w3));
color4 = strcolor(getcolor(w3, 1, 2));
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.
color1 == "LBLUE" and refers to primary series in W2.
color2 == "LRED" and refers to the second item, the overplot in W2.
color3 == "LBLUE" and refers to the first member of the primary item of W3, the first column.
color4 == "LRED" and refers to the second member of the primary item of W3, the second column.
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.
See STRCOLOR to convert a color value into a color name.