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.

If you set the system variable, Graph_ColorSeq, itself, it will control the global default for all graphs. You can specify the symbol sequence for a single variable by assigning a tuple of symbol numbers to Graph_ColorSeq in the GraphSetup attribute of the variable. You can also specify the symbol sequence for a graph template by adding the assignment in the GraphSetup attribute of the template, applying the color sequence to every graph using that template.

To set a color sequence that applies only to a graph template, add the line to set the system variable to the template's graphSetup attribute. For example:

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

To set a graph color sequence that applies to a single graph, insert the setting in this same fashion in the variable's graphSetup attribute.

See Also

Comments


You are not allowed to post comments.