Printing and Picture Export


At present gd supports picture export in general and especially printing
via PostScript files. Several ways are possible:

1. PostScript as primary output

   If you decide that your plot should go directly to some PostScript device
   (file or printer) a typical command sequence looks like:

   GREAD file.gd
   GPLOT / DEVICE(file.ps)
   ... add more text and graphics, if you wish ...
   GPCLOSE

   will create the picture on the selected PostScript device.
   The ending .ps or .eps is significant and specifies
   that the output goes to a regular file. Otherwise a printer will be assumed.
   The GPCLOSE is necessary to properly close the PostScript device.
   Otherwise your picture will be incomplete or the printer will refuse to print it.
   You use the operating systems commands to actually print PostScript files, e.g. on UNIX

   lp  -dprinter file.ps

   or

   lpr -Pprinter file.ps


2. PostScript as secondary output device

   You use this method to build a picture interactively on the display
   and send the finished result to a PostScript device (file or printer):

   GREAD file.gd
   GDISP
   ... add more text and graphics, if you wish ...
   GCOPY file.ps

   This method uses an "invisible" temporary plot file to keep the graphics
   instructions as they are entered. You may also specify a printer instead of
   a file. Note, however, that in this case the picture isn't saved anywhere
   except on the paper copy.

   The GCOPY command allows to fit the pictures size to a given format, e.g.:

   GCOPY / SIZE(a5)
   GCOPY / SIZE(a5) LAND
   GCOPY / SIZE(a5) PORT

   all scale down the picture to fit on DINA5. By default an appropriate
   orientation is chosen for the first command, the others force
   landscape ( 90 degree rotated ) or portrait mode, respectively.

PostScript files in documents

   PostScript files generated by gd have a bounding box and can
   immediately be used for inclusion in documents, e.g. LaTex:

   \begin{figure}[hbtp]
   \epsfig{file=mypicture.eps,width=120mm,height=190mm}
   \caption{}
   \label{mypicture}
   \end{figure}

   On monochrome printers coloured PostScript pictures appear in grey scale.
   This does not always look nice. In such a case you have to remove the
   colour specifications in your dataset or you should use the PALETTE parameter
   to reduce the palette to monochrome.