| SET-INTERACTIVE | Turn interactive plotting on or off |
| SET-HARDCOPY-DEVICE | Nominate device for hardcopy graphics output |
| SET-TERMINAL-DEVICE | Nominate device and type for terminal graphics output |
| SET-PLOT-DEVICE | Toggle between terminal and hardcopy output |
| SET-PLOT-PARAMETERS | Set things like character size etc |
| SET-PLOT-SCALES | Select plot window |
| SET-PLOT-SIZE | Select true size of plot |
| NEW-PLOT | Start a new plot with current X-register contents |
| OVERLAY-SPECTRUM | Overlay X-register contents on existing plot |
| SEE-PLOT | Copy existing plot to nominated device |
| DRAW-PLOT-USING-CURSOR | Make your own data! |
| DELETE-LAST-PLOT | Scrub last plot from plot file |
| CLOSE-PLOT | Close plot file, send to device if hardcopy |
High quality plots are obtained on the graphics terminal, laser printer, or Anadex (dot-matrix) printer. These use MONGO plotting routines, although it may be necessary at some stage to changeover to a more GKS-friendly package such as PGPLOT. In order to use the plotting facilities to the full, it is necessary to understand how (1-D) plotting works.
SPECX uses an intermediary plot file, which contains all the information that finally appears on your screen. It is not necessary to know the internal details of this plot file, but you should know that it begins with the general details of the plot (size and location of the plot, axis details and labels and overall label), and after that is then followed by an arbitrary number of entries, one for each individual spectrum to be plotted. When you begin a new plot (using NEW-PLOT -- see Figure 3.1)
SPECX stores the preliminary information, and the first spectrum. If you are plotting on a graphics terminal, the plot-so-far is then displayed, but for hardcopy devices it is merely held in abeyance. At any time an open plot file can be inspected on any device by using SEE-PLOT. Additional spectra can be added to the plot file, to be plotted on the same set of axes, using OVERLAY-SPECTRUM, or the last one can be removed (if not to taste) using DELETE-LAST-PLOT. Thus OVERLAY-SPECTRUM lets you overlay two or more spectra (Figure 3.3): as with NEW-PLOT the plot-so-far is automatically displayed on a terminal device, but held over for later on a hardcopy device.If you want to make a plot come out on a hardcopy unit, then you can close the plot file explicitly, using CLOSE-PLOT, or it can be closed implicitly as when a new plot is begun or when you exit from SPECX. In either case, if the originally nominated plot device is capable of producing hardcopy, the hardcopy output is produced at this time (terminal output is just discarded when the file is closed implicitly). Alternatively the plot-so-far can be printed on a hardcopy device, without closing the plot file, using SEE-PLOT.
The size of the plot
is set up using SET-PLOT-SIZE in all cases (use sizes of zero to get
defaults which use all of the available plot area), while the plot scales
are set up by SET-PLOT-SCALES -- these may be set to explicit limits or the
program can select appropriate limits automatically. Minor details which you
probably won't want to change often are set in SET-PLOT-PARAMETERS.
Both X and Y-axis labels may be altered directly by setting the variables
X_NAME, X_UNITS, Y_NAME and Y_UNITS to the chosen
(character) value.
The choice of plot device is controlled by SET-PLOT-DEVICE. As noted before, if you plot on the graphics terminal, each stage of the plot is shown as you do it (the plot package however has to erase the screen before adding a new spectrum to an existing plot; deleting a spectrum is managed by erasing the whole screen and redrawing the plot without the offending spectrum). For plotting on a hardcopy device no hardcopy is produced until the plot file is closed, which may be done either explicitly using CLOSE-PLOT, or implicitly by the command NEW-PLOT. Closing the plot file causes a batch job to be submitted to rasterize the plot - the batch queue has lower priority than the on-line task, so the plot may take some time to materialize. If you use SEE-PLOT to produce hard-copy then the rasterizer runs on-line, and you have to wait for it to finish before you can continue working.
A null device is defined to let you accumulate a plot file (i.e. the results of a NEW-PLOT and several OVERLAY-SPECTRUMs) without having the intermediate product displayed - just use SEE-PLOT to look at it when you want to.
For plotting on the graphics terminals both alpha and graphics screens are used simultaneously. If you have interactive graphics mode enabled (use the SET-INTERACTIVE command) then the plot is always left with graphics cursor or cross-hair displayed. Subsequent processing is controlled by typing single characters at the terminal. Each time a key is hit a message appears telling you the (x,y) co-ordinates of the cross-hair at that time. At all times when a plot is displayed in this way it is possible to rescale the plot interactively, or to measure positions on the screen. Other options are possible, depending on the command - FIT-POLYNOMIAL-BASELINE for example requires input of a number of regions within which the baseline is to be fitted.
Whenever the graphics cross-hair is displayed, typing `H' will cause a list of all valid keys and their meanings to be displayed on the alpha screen. The possible options are listed below. The concept of the current box is crucial to use of this facility. When the plot is first put up the current box is defined to have limits in x and y that correspond to the limits of the plot. These limits may be changed using the cross-hair and the L, R, T and B keys. When you are satisfied with the limits you can pass them to the computer, using one of the other keys as appropriate. You can hit any of the L, R, T or B keys more than once - the new value simply replaces the old one. To see the current box hit the D key, and it will be displayed. On Pericom type terminals, the old box will be erased and a new one drawn each time you type D.
Interactive specification of baseline regions (for baseline fitting, determining spectrum statistics or whatever) is very efficient. As long as the INTERACTIVE flag is set TRUE (either using the SET-INTERACTIVE command, or just by simple assignment) the current spectrum will be displayed, along with the graphics crosshair, which can be moved around using the cursor keys, or mouse or whatever. If a baseline region is already defined, and lies within the boundaries of the current spectrum, it will be displayed as a dashed ``default box''. The baseline region thus marked can be accepted by hitting the RETURN key, or can be altered by setting Right and Left limits as usual, followed by the Accept (A) key. In either case, the finally selected baseline region will be marked by a solid box, and the next default box displayed (if it exists). If you accept the maximum number of baseline regions you automatically exit the plot, and continue with the command -- otherwise you need to hit `E' or `Q' to exit, as per usual.
| Key | Mnemonic | Function |
| H | HELP | Produces a list of all valid options |
| ? | QUERY | Tells you the current coordinates of the cursor |
| L | LEFT | Define the left-hand boundary of the current 'box' |
| R | RIGHT | Define the right-hand boundary of the current box |
| T | TOP | Define the top boundary of the current box |
| B | BOTTOM | Define the bottom boundary of the current box |
| D | DRAW | Draw the current box |
| C | CLEAR | Erase the alpha (ASCII) screen |
| Q | QUIT | Leave interactive graphics |
| E | END | Leave interactive graphics, erase graphics screen |
| N | NEW_LIMITS | Redraw the plot taking the current box as new limits. Note that if the limits have not been redefined in one co-ordinate then you get back the original limits according to SET-PLOT-SCALES |
| S | LIMITS | Lets you set new plot limits by hand |
| A | ACCEPT | Tell the program to accept the current box |
| + | MARK | Mark position using cross-hair |
<CR> |
RETURN | Accept default box (for input of baseline regions) |
You can actually edit whole sections of the current spectrum using the graphics crosshair to mark out straight line sections of the spectrum. Use the `+' character to mark vertices of the new spectrum, and the data in the stack will be amended to fit the straight line segments between successive `+' marks. This facility is invoked using DRAW-PLOT.