Suppose you have a data file `a_file.sdf' with a spectrum, i.e. a one-dimensional data set and want to plot is on an X display. This is probably the most commonly used Figaro command, and it is called `splot'. Many command names begin with an `s' for spectrum or with an `i' for image. However, before we can plot anything, we need to tell Figaro what our plotting device is.
Consider the following sequence of commands:
% xdisplay ICL> soft xw ICL> splot a_file accept
The first command is necessary if your X display `server' is not the same as the `client' machine running Figaro for you. It passes the remote client the identity of the local server. You have to declare `xdisplay' each time you log onto the remote client.
Conversely, you may also have to reveal the identity of the remote client to the local server, say with an `xhost' command. Otherwise the remote client may not be allowed use the local server as a display.
The second command tells Figaro which graphics device you want to use. `xw' is an abbreviation for `xwindows'. Together with the information from `xdisplay' this is sufficient to open the window. You should now get a display window on your screen, and a box with the word `PGPLOT' in the centre is drawn into the window. You need to give the `soft' command only once. Figaro will always remember that you want to use the device `xw'.
The third command finally displays the spectrum contained in the file `a_file.sdf'. Data files can have names ending with `.sdf' or `.dst'. They must not contain any additional periods. The Figaro commands know about this, and must not be given this file name extension.
Don't worry about the size of this window. By default you get about 700 by 500 pixels, usually big enough to read the axis labels.
The word `accept' looks like a parameter to the `splot' command. Actually you can use it on any command. It prevents the command from prompting you for information that it can guess itself.
Now consider this more complex sequence of commands. It achieves the same thing, basically.
% xdisplay abc.inter.net % xmake xwindows -g 400x300 -bg green -fg blue ICL> splot spectrum=a_file whole=f XSTART - (XStart) First X-value to be plotted /0.5/ > 3.25 XEND - (XEnd) Last X-value to be plotted /2043.5/ > 3.4 AUTOSCALE - (AUtoscale) Scale so all of spectrum fits? /NO/ > y LABEL - (LABel) Label for plot /''/ > Plotting a spectrum HARDCOPY - (HArdcopy) Produce plot as a hard copy? /NO/ >
The `xdisplay' command now tells the remote client explicitly what the Internet host name of the local server is. This is necessary when you log on indirectly, via a third host.
There is also an extra `xmake' command to create the display window explicitly. This way, we can tell it the size and shape of the window, and the colours for background and lines. You can make your personal preference permanent by specifying resources for `xmake' in your `.Xdefaults' file. If you look at the paper copy or on a black/white display, you will notice that this is not a good choice of colours, since the grey values for blue and green are rather similar.
`xmake' is paired with a command `xdestroy', which you can use to get rid of the graphics window. That is necessary before you `xmake' it with different parameters, or when you have too many windows on your display.
The `splot' command is different in a number of ways. Before, we had given the input data set as the first parameter. When we are not sure about the sequence of parameters, we can specify them by name. For most Figaro commands that work on spectra as opposed to images, the input data are specified in the parameter called `spectrum'.
Next, we have specified the `whole' parameter as false, so that this time we can choose only part of the spectrum to be displayed. We also left out the `accept' keyword, that is why the command asks us a number of questions while it runs.
FIGARO A general data reduction system