In order to get paper copies instead of screen plots, you will usually use the `hard' device instead of the `soft' device. (Finally you understand why it's called the `soft' device!) Similar to the commands `soft' and `idev' there is a command `hard' to tell Figaro once and for all what your hard-copy device is:
ICL> hard ps_l
The main hard-copy devices these days are PostScript files-files, not printers! This means your plots go into a series of files. The first is called `gks74.ps', the second is `gks74.ps.1', the third ends with `.2', and so on.
It is a bit difficult to keep track of these files. E.g. after you created three files you might delete the second. The fourth plot may then use the free name and appear to be the second plot. Also, if an application erases the graphics device before plotting, you might get two files: If you `print' the first, you may just get a blank sheet of paper from the printer.
You can use `ghostscript' (Unix command `gs'; see SUN/197) or, more simply, `ghostview' to view the plots on the screen before you print the wrong one. E.g. type:
ghostview gks74.ps
There are a number of PostScript devices you can choose from. When `hard' prompts for the device, you can try `options' to get a list of possible replies. The PostScript devices are:
Before you get enthusiastic about Colour PostScript, it is not possible to use the `colour' application in conjunction with a printer device. This is because `colour' would write its own PostScript file and the information does not go into the PostScript files with the actual display. You need something like KAPPA's command `display', which can load a colour table immediately before displaying the image. In Figaro the only use for Colour PostScript is probably to get coloured line plots where the applications support this.
The difference between the `ps' and `epsf' devices is that the former are complete and intended to be sent to the printer. The latter are incomplete and intended as elements of more elaborate PostScript documents. You could combine several EPSF files into a single PostScript file, or you could include EPSF files as figures in a TEX or LATEX document. The figures would be included during processing with `dvips'.
Consider this example:
ICL> hard epsf_p ICL> igrey image1 17 23 130 125 hardcopy=t ICL> icont image2 17 23 130 125 hardcopy=t % psmerge -e -s0.5x0.5 gks74.ps -s0.5x0.5 gks74.ps.1 > hardcopy.eps
We choose the portrait orientation for Encapsulated PostScript. This is helpful for later inclusion in a LATEX document, since it is usually printed in portrait orientation as well.
We use `igrey' and `icont' to produce plots of two images that have the same number of pixels per degree on the sky, and we choose the same part of the image. The two applications also use the same part of the display device. You might be tempted to use this sequence for an overlay on the screen, but `icont' will wipe out the plot that `igrey' made.
We use the `hardcopy' keyword to direct the plots to the `hard' device rather than the `soft' device. The result are two files `gks74.ps*'.
Instead of printing each on its own piece of paper, we use the
`psmerge' utility (see SUN/164) to combine the two
into a single figure. `psmerge' can not only combine several EPSF
files, it can also scale, shift and rotate each EPSF graphic
individually in the process. The `-s' option scales the graphs to half
the size in
and in
.
The `-e' option here means that the output is again EPSF rather than PostScript. The idea is that we want to include `hardcopy.eps' in the LATEX version of this document like such:
...style[11pt,epsf]{article}
...
\begin{figure}[htb]
\begin{center}
\leavevmode\epsffile{sun86_hard.eps}
\end{center}
\end{figure}
We are cheating here, because the GKS EPSF files have an unsuitable `BoundingBox:'. You have to edit these files and move one line from the end of the file to the beginning: There are two lines in the EPSF file that begin with `%%BoundingBox:'. At the top of the file it says `(atend)' and at the bottom of the file it says e.g. `0 0 271 395'. The line at the end must be moved to where the first line is, and the first line must be removed. Since PostScript files contain plain text, you can use the `vi' editor to do this.
Also, this BoundingBox is somewhat too large, it contains not only the graphic but some white space. You can use `ghostview' to display the EPSF file. Its cursor position is constantly displayed, so you can move the cursor to the actual corners of the graph and thus find out better numbers for the BoundingBox.
Instead of `igrey', you can used `image' of course to make use of its histogram optimisation. You will find it very difficult to align it with any contour plot though.
FIGARO A general data reduction system