Next: How To...
Up: Overview of AST Concepts
Previous: Input/Output Facilities

## Producing Graphical Output

Two dimensional graphical output is supported by a specialised form of FrameSet called a Plot, whose base Frame corresponds with the native coordinates of the underlying graphics system. Plotting operations are specified in physical coordinates which correspond with the Plot's current Frame. Typically, this might be a celestial coordinate system.

Three dimensional plotting is also supported, via the Plot3D class - sub-class of Plot.

Operations, such as drawing lines, are automatically transformed from physical to graphical coordinates before plotting, using an adaptive algorithm which ensures smooth curves (because the transformation is usually non-linear). ``Missing'' coordinates (e.g. graphical coordinates which do not project on to the celestial sphere), discontinuities and generalised clipping are all consistently handled. It is possible, for example, to plot in equatorial coordinates and clip in galactic coordinates. The usual plotting operations are provided (text, markers), but a geodesic curve replaces the primitive straight line element. There is also a separate function for drawing axis lines, since these are normally not geodesics.

In addition to drawing coordinate grids over an area of the sky, another common use of the Plot class is to produce line plots such as flux against wavelength, displacement again time, etc. For these situations the current Frame of the Plot would be a compound Frame (CmpFrame) containing a pair of 1-dimensional Frames - the first representing the X axis quantity (wavelength, time, etc), and the second representing the Y axis quantity (flux, displacement, etc). The Plot class includes an option for axes to be plotted logarithmically.

Perhaps the most useful graphics function available is for drawing fully annotated coordinate grids (e.g. the Figure below).

This uses a general algorithm which does not depend on knowledge of the coordinates being represented, so can also handle programmer-defined coordinate systems. Grids for all-sky projections, including polar regions, can be drawn and most aspects of the output (colour, line style, etc.) can be adjusted by setting appropriate Plot attributes.

Further reading: For a more complete description of Plots and how to produce graphical output, see . Also see the Plot entry in .

Next: How To...
Up: Overview of AST Concepts
Previous: Input/Output Facilities

AST A Library for Handling World Coordinate Systems in Astronomy