Difference between revisions of "Graph ColorSeq"

 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[category:System Variables]]
+
[[Category:System Variables]]
 +
[[Category: Graphs]]
  
= SysVar 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.  
+
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:
 +
:<code>Graph_ColorSeq: [65535,0,0, 0,65535,0, 0,0,65535, 65535,65535,0, 65535,0,65535, 0,65535,65535, 0,0,0]</code>
  
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.  
 
These colors are red, green, blue, yellow, magenta, aqua, black, respectively.  
  
Line 13: Line 15:
 
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.  
 
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. 
+
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:
 
 
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:
 
  
( GraphSetup of MyTempl := (GraphSetup of MyTempl) & chr(13)  
+
:<code>(GraphSetup of X := (GraphSetup of X) & chr(13)</code>
      & "Graph_ColorSeq := [65535,0,0, 0,65535,0, 0,0,65535]" )
+
::<code>& "Graph_ColorSeq := [65535,0,0, 0,65535,0, 0,0,65535]")</code>
  
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.
+
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:
  
= See Also =
+
:<code>(GraphSetup of T := (GraphSetup of T) & chr(13)</code>
 +
::<code>& "Graph_ColorSeq := [65535,0,0, 0,65535,0, 0,0,65535]")</code>
  
 +
== See Also ==
 
* [[Graph_SymbolSeq]]
 
* [[Graph_SymbolSeq]]
 +
* [[Graph settings]]
 +
* [[Graph Setting Associations]]
 +
* [[Typescript]]

Latest revision as of 01:36, 26 April 2021


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.