next up previous 222
Next: The graphics translation file
Up: Customising the plot
Previous: Running catchartrn

Tutorial example graphics translation files

By convention graphics translation files have file type `.grt'. A graphics translation file is a simple ASCII text file which can be created and modified with an editor. Figure [*] shows a simple graphics translation file. This example is available as file:

/star/share/cursa/simple.grt

It plots all the stars in a target list extracted from the version of the Bonner Durchmusterung available at LEDAS as red filled circles scaled according to magnitude. The lines beginning with an exclamation mark (`!') are comments and are ignored. Similarly text to the right of exclamation marks is ignored. Blank lines are ignored.

Figure: Simple graphics translation file
\begin{figure}\par
\begin{verbatim}!+
! Simple graphics translation file.
!
! ...
...nd'.SIZE1 = ascale(VMAG, 5.0D-2, 1.0D-2)\end{verbatim}
\par\par
\end{figure}

The plotting symbol is defined by the SYMBOL item. The various options are listed in Table [*]. Similarly, the colour is set by item COLOUR. The permitted colours are given in Table [*]. The symbol size is simply a fraction of the plotting area available, as specified by UNITS. The alternative units are listed in Table [*]. The size of the plotting symbol is defined by parameter SIZE1. SIZE1 can be any valid CURSA expression (including a constant value, such as `SIZE1 = 5.0E-2', of course). The additional functions scale and ascale are provided for scaling quantities for display. They are described in the following section.

Figure [*] shows a more complicated graphics translation file. This example is available as file:

/star/share/cursa/complex.grt

Again it plots all the stars in a target list scaled according to magnitude. However, here the scaling is between the fixed magnitude range 7.5 - 10.0 rather than being determined from the brightest and faintest stars in the list. Also, the IF ...ELSE ...END IF construct is used to vary the plotting symbol with magnitude. Stars brighter than magnitude 7.5 are plotted as blue open stars, stars between magnitude 7.5 and 9.0 as red filled circles and fainter stars as red open circles.

Figure: Star / galaxy graphics translation file
\begin{figure}\begin{verbatim}!+
! More complicated graphics translation file....
... scale(VMAG, 7.5D0, 1.0D1, 5.0D-2, 1.0D-2)\end{verbatim}
\par\par
\end{figure}

Both the examples given here have shown the symbol size being scaled with magnitude. However, it is important to realise that the expressions defining both SIZE1 and the IF ...ELSE ... END IF conditions can be any valid CURSA expressions (see Appendix [*]) involving any columns in the target list. Graphics translation files are provided for most of the catalogues in the default list of remote on-line catalogues used by CURSA (see Table [*]) and these can be used as further examples.



next up previous 222
Next: The graphics translation file
Up: Customising the plot
Previous: Running catchartrn

CURSA Catalogue and Table Manipulation Applications
Starlink User Note 190
A.C. Davenhall
4th November 2001
E-mail:starlink@jiscmail.ac.uk

Copyright © 2001 Council for the Central Laboratory of the Research Councils