Next Previous Up Contents
Next: Log Window
Up: Other Windows
Previous: Available Functions Window

### A.11.13 Variables Window

This window displays global variables and allows you to adjust their values. You can find it by using the Global Variables () toolbar button in the main Control Window or the equivalent menu option in its File menu.

The variables controlled here can be used in the expression language, for instance when defining new synthetic columns and subsets, or in column selectors such as those used for plot coordinates, or for the function expression in function plots. Adjusting the values of the variables in this window will then have an instant effect on the columns, subsets and plots that depend on them.

This can allow you for instance to experiment with aspects of a plot such as subset inclusion or coordinate definitions by changing variable values using the slider in this window and seeing how plots dependent on the variable in question change. There is one caveat to this: if visible plots dependent on a variable being changed in this way are very large or numerous, such adjustments can result in a lot of computation or I/O and slow things down. The plot windows therefore have a Replot on Data Change () button that allow you to prevent such immediate updates, which will then only take place on a replot which is triggered in some other way.

Variables Window

The window is in two parts. On the left is a list of the currently defined variables. By default there are two of these: `var$x` is a floating point variable, and `var$i` is an integer variable, but new ones can be added. Selecting one of the names in the list by clicking on it shows the corresponding value panel on the right.

The right hand panel lets you adjust the selected variable's value. Its appearance differs slightly depending on whether the variable is floating point or integer. There are two ways to change the value, the Entry and the Slider controls. Only one of these is active at a time, use the radio buttons on the left to choose which one to use.

Entry
  Type the new variable value into the Value field to change it. If you enter an invalid value, it will go back to its previous value. As long as this widget is active, the value is not constrained by the current slider limits.

  In the case of integer variables, there are also +1/-1 buttons that will nudge the value up and down by 1.

Slider
  The value can be continuously adjusted by dragging the slider. Resolution can only be at the pixel level, so if you want more precision, you can resize the window to be wider. You can use the Range fields to reset the lower and upper bounds for the slider.

  In the case of floating point variables, there is also a Scale selector that lets you choose the scaling between the lower and upper slider bounds to one of the available scaling options (linear, log, asinh and symlog). Since some of these options (logarithmic) require positive definite values, changing the scaling may force a reset of the range values.

The following toolbar/menu items are available:

Add new variable
  This will pop up a window asking you for the name and type of a new variable. The type may be Floating Point point or Integer. The name must be a syntactically legal identifier (first character alphabetic including `$` and `_`, other characters alphanumeric). Any unused name matching that constraint is allowed, but beware of choosing names that may clash with other terms in the expression language such as column or subset names. Sticking to the `var$xxx` convention is a good way to prevent that happening.
Remove selected variable
  The variable currently selected in the list and visible in the right hand panel will be deleted following confirmation.

Next Previous Up Contents
Next: Log Window
Up: Other Windows
Previous: Available Functions Window

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk