Graph ColorSeq


SysVar Graph_ColorSeq

This system variable specifies the sequence of colors used for lines, symbols, or bars in graphs. (If the variable is not set, Analytica uses an internal default color sequence.) Each color is specified by a triplet of numbers, giving the intensity of Red, Green and Blue (RGB), on a scale from 0 (off) to 65535 (maximum). Thus, the definition of Graph_ColorSeq is a tuple containing n triplets or 3n numbers.

Analytica does not yet offer a graphical interface to modify color sequences. You can only set it via the Typescript window, or in a function called from a Button script. For example, you could enter the following into the Typescript:

Graph_ColorSeq: [65535,0,0, 0,65535,0, 0,0,65535, 65535,65535,0, 65535,0,65535, 0,65535,65535, 0,0,0]

These colors are red, green, blue, yellow, magenta, aqua, black, respectively.

This example specifies only 7 colors. A graph needing more than 7 colors will repeat after the first 7.

A color intensity can also be a negative value: It interprets -n as 65536-n. Thus, it treats -1 as 65535, i.e. totally on.

The colors in system variable, Graph_ColorSeq are the global default for all graphs. You can override these colors for a single variable by assigning RGB colors to Graph_ColorSeq in the GraphSetup attribute of the variable -- for variable X, for example:

(GraphSetup of X := (GraphSetup of X) & chr(13)
& "Graph_ColorSeq := [65535,0,0, 0,65535,0, 0,0,65535]")

You can also specify the color sequence for a graph template by adding the assignment in the GraphSetup attribute of the template, which will control the color sequence for every graph using that template -- for example for template T:

(GraphSetup of T := (GraphSetup of T) & chr(13)
& "Graph_ColorSeq := [65535,0,0, 0,65535,0, 0,0,65535]")

See Also

Comments


You are not allowed to post comments.