Obtaining a metafile with graphics output
Depending on the system on which you run Garfield, a default
metafile is or is not opened.
Metafile output can be generated both in interactive and
in batch runs.
You can generate metafiles in several different output formats
at the same time.
Requesting metafile output at startup
You can request metafile output, or suppress it,
at startup time with command line arguments:
garfield -metafile
garfield -nometafile
The option -metafile
has
several sub-options:
name file
- The file name of the metafile.
The keyword
file
is
a character string.
type format
- Where
format
must be chosen from a
list that depends on the GKS version for which Garfield has been compiled.
The list for HIGZ is shown below.
GKS_identifier gksid
- If you use another GKS than the one for which Garfield has been compiled,
you have to specify the metafile format via the GKS identifier.
You will find a list of such identifiers in the manual of the GKS
system that you are using.
offset offset
- The offset between the logical unit on which the metafile is opened and
the channel identifier for the metafile.
Some flavours of GKS use this offset to distinguish between metafile formats,
offset
is an integer number.
This keyword is ignored by HIGZ.
single-frame-file
- Specifies that each metafile should only contain a single graph.
You have therefore to take care that the file name depends on global
variables that change between plots, such as the pre-defined variable
called
FRAME
.
This option is implied if the file name contains braces:
-metafile name plot_\{frame\}.eps
.
This option is particularly useful with EPS metafiles.
multiple-frame-file
- Specifies that a metafile is allowed to contain several plots.
This option is implied if the file name does not contains braces.
Example:
garfield -metafile type PostScript name currents.ps
Changing metafile output during the run
You can open and close metafiles during a Garfield run.
This is accomplished with graphics control statements described in the
on-line help file,
under the heading "graphics".
Opening a metafile can be done as follows:
!add meta type format name file
!open meta
!activate meta
To close it:
!deactivate meta
!close meta
!del meta
In this example, meta
represents
a string that you may choose,
format
must be chosen from
a list that depends on the GKS version for which Garfield has been compiled,
and file
should be replaced
by the file name.
The list for HIGZ is shown below.
List of metafile formats with HIGZ
At CERN, Garfield is currently compiled assuming
HIGZ
as graphics system.
format
| Description
|
PostScript | PostScript, default |
PS_landscape | PostScript, landscape |
PS_portrait | PostScript, portrait |
EPS | Encapsulated PostScript |
encapsulated_PS | Encapsulated PostScript |
LaTeX | LaTeX |
In these pages, text set in
olive green Courier
should be typed as-is.
Text set in orange Courier
should be replaced by a value of a type which is usually specified.
Last updated on 25/3/00.