7 Plotting

 7.1 Plotting options
 7.2 Cursor commands
 7.3 Default plotting (and other) options
 7.4 Getting hardcopy plots

The plotting commands sit on top of the GKS/SGS/AUTOGRAPH packages (see SUN/83, SUN/90, etc.; sometimes the command names don’t relate in an obvious way to the name of the graphics routine which is called, because DIPSO was originally written using a different graphics package). Although DIPSO grew with simple data sets in mind (i.e. monotonically changing X values) it will plot some more complex arrays. (The example program for the user interface, described below, generates a circle.)

7.1 Plotting options

Plotting can be done with a variety of symbols (MARK, MROT), or line types (TLINE, TROT) in POLY (i.e join-the-dots) or HIST (histogram) mode. If you have access to appropriate hardware, colour plotting is also possible (CSET, CROT). Device changes can be made at any time, so that you can, for example, switch between an Ikon, Pericom, and laser printer at will. Alternatively, you can stick to a single device and display data in different zones of the plotting surface. A set of useful sub-zones is provided automatically (see the TZONE command).

7.2 Cursor commands

An important aspect of any plotting package is making measurements from, or marking points on, a plotting surface using a cursor (where available). In DIPSO, the cursor will respond to any alphanumeric key. If the functionality of the command requires only one cursor hit (e.g. XV to measure X values), then the command is exited by making two cursor hits at the same point. This method of exiting generalises to other cursor-driven commands which require multiple inputs (e.g. CREGS).

7.3 Default plotting (and other) options

The default options (all of which can be changed at will) are:

DEVice 0 - (null device)
HIST - ("histogram" plotting style)
TZONE0 - (use the entire plotting surface)
NXY - (auto-scaling on X and Y axes)
CSET1 - (plot in white on the Ikon)
TLINE1 - (continuous lines)
BOX - (clears frame between plots)
NOFILL - (MARK symbols open)
TICKS<null> - (Tick marks on axes calculated automatically)
FONT0 - (Hardware character set)
XJ, YT - (Plot has "justified" X axis and "trimmed" Y axis)
LABON - (Full labelling of axes)
GRIDSTYLE1 - (Four sides to the plot box drawn in)
PPROMPTF - (PM without arguments plots current arrays)
XLAB"Wavelength"
YLAB"Flux"

These defaults are chosen as a compromise between aesthetic elegance and speed of plotting. For an ugly but fast plot, choose POLY and GRIDSTYLE5; for truth and beauty, choose FONT 2.

This is as good a point as any to note some other default settings for DIPSO:

ECHO-1 - (Commands file inputs not echoed at the terminal)
BEEP - (input errors induce a beep)
HANDLER1 - (robust error handling)
TPROMPTF - (doesn’t insist on a string with TITLE)
USENDFT - (NDF structures are used to store data on disk)
USEHTXF - (Help information is displayed in plain text format)

7.4 Getting hardcopy plots

DIPSO doesn’t “remember” what is on the plotting surface in any way. Thus you can’t get an “instant” copy of a plot on your terminal (unless you have some special hardware which will do it for you). Instead, you must change devices and execute the appropriate series of commands to do the plot for you.

Plotting on a hardcopy unit (laser printer, line printer, etc.) will normally leave a (frequently large!) file in your working directory, and this file will need to be printed on the appropriate device before you actually get a plot out. Check the GKS documentation (or your node manager!) for details; and remember to tidy up your directory afterwards, or you will quickly run out of disk quota!