GRVIEW, GRCONV and GRPLOT Metafile Utilities
User's Guide
Version June 1991
Nicole Cremel
Computing and Networks Division
CERN Geneva, Switzerland
The document in its present form has been written by N. Cremel
with much help from D.R. Myers. The contents have been assembled from
material provided by many people, especially A. Ballanti,
M. De Jode, I. Mclaren, and J. Moebes.
Jan Moebes (FH Niederrhein, Krefeld, RFA), who was a CERN associate
during 1987, is the author of the first version of GKSTV interfaced to
GKSGRAL. The graphics editor, GKSED, was originally written
by W. Wojcik and J. Korsakissok, but has been completely redesigned
by J. Moebes to run with GKSTV and to change segments and primitive
attributes via Zebra-banks.
The GRVIEW and GRCONV commands have been designed by N. Cremel and
both use the same executable module.
They are based on the original code from GKSTV and GKSED, but with many changes
and additions, and are compatible with GKSGRAL Version 3.2.
A version of GRVIEW which runs on top of DECGKS has been adapted
by M. De Jode.
The source code is available from the CERN Program Library.
The user interface for GRPLOT on VM has been written by A. Ballanti,
who has collaborated with J. Bunn and G. Lee to produce
VAX and Apollo versions. It makes use of CERN-written interpreter
and driver for the Xerox and 3812 printers written by N. Cremel,
and a GTS-GRAL driver for the Versacolor plotter.
The source text of this document was marked-up in SGML, and the
figures were inserted directly from a GKS metafile.
GRVIEW and GRCONV are the officially supported CERN utilities for
GKS metafile manipulation. They have replaced the
old and well-known GKSTV/GKSED commands.
The reason to introduce two different commands is to make a clear
distinction between the following well-defined functions:
- GRVIEW supports the DISPLAY, COPYING and EDITING of a GKS metafile
on a graphics terminal.
This always initiates an interactive session.
- GRCONV supports the CONVERSION of a GKS metafile into another
format (PostScript, Tektronix escape codes, etc.).
This does not require the use of a graphics terminal
but may be used interactively from an alpha-numeric terminal or
as a batch job, which is how we recommend it should be used.
The list of output formats is not exhaustive, and the intention is
to provide in the future for further formats as they are required
(CGM for instance.)
GRPLOT is the command which should be used to plot a GKS
metafile on any printer.
Interactive HELP for the commands is provided on all systems.
For problems which cannot be resolved by the UCO, or
if you have suggestions for corrections or improvements,
please contact n.cremel@cern.ch.
Throughout this document:
- the term frame is used to indicate
all the primitives stored in a metafile between consecutive occurences
of the Clear Workstation metafile item.
- the term picture is usually used to indicate an image
on a display
screen, but may also be used instead of frame.
- the word metafile refers to "GKS Appendix E metafile"
(format proposed in the appendix E of the ISO draft X3H3/83).
Presently at Cern it means essentially metafiles produced
by the GKS/GTSGRAL software. (GRVIEW, GRCONV and GRPLOT do not
concern Postscript files).
Metafile Display with GRVIEW
GRVIEW is a general command to display a GKS graphics metafile
on a graphics terminal. It provides three main
functions which can be selected with different options:
- The VIEWING function, which is the default, does
not require a specific option to be specified.
It allows the user to display any frame from an existing input metafile.
- The COPY function (selected with option COPY)
also allows an input-metafile to be displayed, but in addition
frames may be selected for copying onto an output file, which
may be another metafile, a PostScript file, or a file containing
Tektronix escape sequences. When using this option the contents of
pictures cannot be changed, but each picture may be named
and scaled in size.
In addition several frames can be merged onto one.
- The EDITING function (option EDIT)
allows the pictures on an input metafile to be edited (i.e. the
contents of the picture can be changed), or for a totally new picture
to be generated.
General Format
The general format of the GRVIEW command is, according to the
system used:
- Syntax:
- GRVIEW fn ft fm ( OPTIONS [VALUE] (on IBM/VM),
- GRVIEW filename/QUALIFIERS[=VALUE] (on VAX/VMS),
- grview filename -options [value] (on Apollo
Commands and file names are case sensitive under Aegis and UNIX.
).
To access GRVIEW in VIEWING mode the format is:
Options which are enclosed with brackets are mandatory for the command,
but if they are missing the user will be prompted to supply value
interactively.
-
- GRVIEW fn ft fm [(TERM
The exact syntax and the meaning of this (these) option(s) will be
described later on (section ).
value](on IBM/VM),
- GRVIEW filename[/TERM=value] (on VAX/VMS),
- GRVIEW filename [-term value] (on Apollo).
To access GRVIEW in COPY mode the format is:
-
- GRVIEW fn ft fm ( COPY [ TERM... OUT... OTYPE...
] (on IBM/VM),
- GRVIEW filename/COPY [ /TERM.../OUT.../OTYPE...
] (on VAX/VMS),
- GRVIEW filename -copy [ -term... -out... -otype...
] (on Apollo).
The filename (fn ft fm on VM) of the metafile to be plotted is a
mandatory parameter for GRVIEW in VIEWING or COPY mode. If it is
missing the user will be prompted for it. This will be done via a
panel if using a full screen terminal on CERNVM.
To access GRVIEW in EDIT mode the format is:
-
- GRVIEW [fn ft fm] ( EDIT [ TERM... OUT... OTYPE...
] (on IBM/VM),
- GRVIEW [filename]/EDIT [ /TERM.../OUT.../OTYPE...
] (on VAX/VMS),
- GRVIEW [filename] -edit [ -term... -out... -otype...
] (on Apollo).
Note that the input filename is not mandatory for GRVIEW with
option EDIT: it depends whether an existing metafile has to be
edited or a totally new picture generated. (GRVIEW with option EDIT
is described with more details in Chapter ).
Mandatory Parameters
These parameters are requested by the command. If any of
them is missing the user is prompted to supply values interactively.
The following is a list of all the parameters for which the user
can be prompted, depending on the option selected in GRVIEW.
Not all of these parameters are mandatory or for all GRVIEW functions.
TERMTYPE Terminal-type
The qualifier TERMtype followed by a valid workstation type (integer)
must be used to specify the graphics terminal which is used.
This is a mandatory parameter for GRVIEW whatever option is
selected.
Users can find the list of all the graphics terminals supported at CERN
and the value for TERMTYPE in the Guide to Computer Graphics at
CERN (CN/US/111) available from the UCO, or by typing
HELP GKS or FIND GKS.
- Syntax:
- GRVIEW (TERM 7878 (on IBM/VM),
- GRVIEW/TERM=7878 (on VAX/VMS),
- grview -term 10002 (on Apollo).
It is possible to set a default value for the terminal type on VM,
via the system scheme provided by the command "DEFAULTS SET GRVIEW".
But note that having set a default the user will still be asked
by the program to confirm with a the validity of this terminal
type, except in the case he explicitly types on VM the command
"GRVIEW ( TERM value". This is because so many different types
of terminal are now in use that it is no longer possible to assume that
GRVIEW will work correctly with a single default type, which was
the case in the past. Use of incorrect terminal types has caused a whole
series of problems and inconveniences for both users and the UCO,
especially when, by chance, the default terminal type 'almost worked'.
Use of an incorrect terminal type when using CERNVM as the host
could even be fatal, as it can kill the communications link.
Thus, if the user does not give the terminal type in the command,
then GRVIEW will prompt for it:
grview> Workstation type (?=HELP) =? :
or, on VM, and if 7878 has been selected as the default value:
grview> Workstation type (?=HELP) =7878 :
If the user hits "?" then a list of valid
workstation types will be displayed (depending on the system used):
grview> List of valid workstation types :
7878 (FALCO) : FALCO, Pericom GRAPH PAC (old Pericom)
7800 (MG600) : MG600, MG200
101 (T4014) : Tektronix 4010, 4014
103 (T4015) : Tektronix 4014 with enhanced graphics option
121 (T4107) : Tektronix 4107,4207,Pericom MX2000 (VT100 setup)
221 (MX2000) : Pericom MX2000 (VT200 setup)
122 (T4109) : Tektronix 4109
123 (T4111) : Tektronix 4111
125 (T4113) : Tektronix 4113
127 (T4115) : Tektronix 4115, Pericom MX8000 (VT100 setup)
227 (MX8000) : Pericom MX8000 (VT200 setup)
INPUT filename
This is the name of the input metafile to be displayed.
The INPUT filename is a mandatory parameter for GRVIEW
without any option or with the COPY option.
However, it is NOT mandatory for GRVIEW with the EDIT option,
as this option allows the user to generate a totally new output file.
With the EDIT option selected, and if the input filename is not present,
the user is able to create a NEW picture. If EDIT is not selected,
and the input filename is missing, then the user will be prompted for it.
The input filename, when present, must appear as the first
parameter in the command on IBM/VM and Apollo
(no restriction on VAX/VMS).
- Syntax:
- GRVIEW MYFILE METAFILE A (on IBM/VM),
- GRVIEW MYFILE.METAFILE (on VAX/VMS),
- grview myfile.metafile (on Apollo).
OUTPUT filename
The qualifier OUTput followed by a filename must be used to specify the name
of the output file to be produced, if any. The existence of an
output file is not required if the user only wishes to look at
the frames contained in an input metafile, but it is required
if the user wants to copy or edit some of these frames.
Thus, the OUTPUT filename is a mandatory parameter for GRVIEW
with the options COPY or EDIT but is not mandatory for GRVIEW
without any options.
If COPY or EDIT is selected, and the output filename is missing,
then the user will be prompted for it.
- Syntax:
- GRVIEW ( OUT myout post c (on IBM/VM),
- GRVIEW/OUT=myout.post (on VAX/VMS),
- grview -out myout.post (on Apollo).
OTYPE filetype
The qualifier OTYpe followed by a value must be used to specify
the type of the output file produced, if any.
OTYPE is a mandatory parameter for GRVIEW
with the options COPY or EDIT but is not mandatory for GRVIEW
without any options.
If COPY or EDIT is selected and the output type is missing,
then the user will be prompted for it.
The following is a list of allowed values for OTYPE
(not all values for OTYPE may be accessible on every system):
- METafile
- GKSGRAL metafile.
- MAE2DO
- idem.
- POStscript
- PostScript Portrait Monochrome.
- EPS
- Encapsulated PostScript (Portrait Monochrome) for inclusion into
a document.
- PSTPM
- (or EPSPM) idem.
- PSTLM
- (or EPSLM) PostScript Landscape Monochrome
- PSTPC
- (or EPSPC) PostScript Portrait Colour
- PSTLC
- (or EPSLC) PostScript Landscape Colour
- TEKtronix
- (VAX only) Tektronix 4014 escape codes (e.g. for LN03 printers)
- T4014
- idem
- HPGLP
- HPGL A0 Portrait
- HPGLL
- HPGL A0 Landscape
This list is the same as for GRCONV (see )
except for the SGML/BOOKM formats which is not supported by
GRVIEW (for this format users must first make a metafile and
then convert it using GRCONV).
- Syntax:
- GRVIEW ( OTYP postscript (on IBM/VM),
- GRVIEW/OTYP=postscript (on VAX/VMS),
- grview -otyp postscript (on Apollo).
Optional Parameters
The various qualifiers in this section can be used to specify specific
options. In all cases a default is provided.
LOGFILE filename
The qualifier LOGfile followed by a filename may be used to specify the name
of the logfile produced by the run. This is, by default,
GRVIEW LOG A on VM and GRVIEW.LOG on other systems.
The logfile contains all error messages, whether coming from GKS or
from GRVIEW itself.
- Syntax:
- GRVIEW ( LOG myview log c (on IBM/VM),
- GRVIEW/LOG=myview.log (on VAX/VMS),
- grview -log myview.log (on Apollo).
NAMES
Use of the qualifier NAMes
ensures that the whole metafile is read in order to
count the frames and to make a list of frame names, if any,
that were provided by calling the CERN utility function GCNAME
in the application which produced the metafile.
The GCNAME utility is described in the document Guide to Computer
Graphics at CERN, CN/US/111.
This qualifier may also be used
in the case that the metafile does not contain frame names,
in which case an enumerated list will still be produced
with the names field containing "*NONAME".
In both cases it is possible to display a frame
by selecting the corresponding entry in the list,
which allows for a nicer user interface
but can be a slow process for large metafiles.
If the NAMES option is not selected then no check is made on the input
metafile concerning the number of frames and their names.
(See also option NBFR described in section .)
Note that the use of this option is equivalent to the default
case in GRCONV and in the previous command GKSTV.
The NAMES option does not require any value.
- Syntax:
- GRVIEW ( NAMES (on IBM/VM),
- GRVIEW/NAMES (on VAX/VMS),
- grview -names (on Apollo).
NBFR nb
The qualifier NBFR followed by an integer can be used
in order to give to the program the number of frames
contained in the input metafile. Use of the option allows for a nicer
user interface, for example, it enables use of the "LIST FRAMES" menu-item
in order to select the frames to process with the mouse,
and contrary to the NAMES option it does not slow down the process.
- Syntax:
- GRVIEW META DAT ( NBFR 4 (on IBM/VM),
- GRVIEW META.DAT/NBFR=4 (on VAX/VMS),
- grview meta.dat -nbfr 4 (on Apollo).
- (This is for an input file META DAT (META.DAT) which contains
4 frames.)
NOVERBOSE
If the qualifier NOVerbose is selected the frames are displayed without
additional text from menus or messages. A "beep" occurs
when the display terminates. The user can continue by pressing .
The NOVERBOSE option can be useful to display the picture without
disturbing text (e.g. when printing on an attached hardcopy device).
The NOVERBOSE option does not require any value.
- Syntax:
- GRVIEW ( NOVERB (on IBM/VM),
- GRVIEW/NOVERB (on VAX/VMS),
- grview -noverb (on Apollo).
PROMPT value
The PROMPT option must be used to set the maximum number of
graphics instructions allowed before the user is asked whether
processing should continue or not. If PROMPT is set to 0 then
the option has no effect and the program will continue without interruption.
The default value for PROMPT is 1000 on VM and 0
On most systems a control key (Y on VAX/VMS and
Q on Apollo) provides the same functionality.
on other systems.
- Syntax:
- GRVIEW ( PROMPT 2000 (on IBM/VM),
- GRVIEW/PROMPT=2000 (on VAX/VMS),
- grview -prompt 2000 (on Apollo).
STOP value
The qualifier STOP may be used to set the maximum number of
GKS errors allowed before processing is stopped.
This can save both wasted CPU time as well as the disk space
used to store the log file.
Thus, "STOP n" means that after n errors the job will end.
If STOP is set to 0 then the option has no effect and the job
will not be stopped because of graphics errors. The default value for
STOP is 50 on all systems.
- Syntax:
- GRVIEW ( STOP 20 (on IBM/VM),
- GRVIEW/STOP=20 (on VAX/VMS),
- grview -stop 20 (on Apollo).
HARDTEXT
If the qualifier HARDtext is selected then all text will be
written with "hardware characters" without regarding the text
"font and precision" defined in the input metafile. Use of this
option can increase a lot the speed of the display of a picture
for which GKS software fonts have been selected.
- Syntax:
- GRVIEW ( HARDT (on IBM/VM),
- GRVIEW/HARDT (on VAX/VMS),
- grview -hardt (on Apollo).
Users must be aware that if they select this option they will not
see on their terminal the actual text representation that they may
have selected for a nicer printing: it is only to accelerate the
display.
- This option is only valid for GRVIEW when no output file is
requested (it is not valid for GRVIEW with the COPY or EDIT option).
- HARDTEXT may have no effect for pictures produced by PAW, HIGZ
or HPLOT: this is because the default text font and precision selected
by these products is drawn with GKS polylines and NOT GKS TEXT
primitive. It will have effect if users explicitly select GKS software
fonts in PAW (command "IGSET TXFP") or in their own application based
on HIGZ or HPLOT.
FMO filemode (VM only)
The qualifier FMO followed by a valid filemode allows the user to change the
filemode of the output file produced (this is A by default).
- Syntax:
- GRVIEW ( FMO B (on IBM/VM).
Examples
Example 1: No Options
- Syntax:
- GRVIEW fn ft fm (on IBM/VM),
- GRVIEW filename (on VAX/VMS),
- grview filename (on Apollo).
This simple command can be used to look at the pictures contained
in an input metafile.
The user will see the following menu:
------------------------
| 1 EXIT |
| 2 NEW INPUT FILE |
| 3 SKIP FRAMES |
| 4 NEXT FRAME () |
| 5 SELECT FRAME |
| 6 LIST NAMES |
| 7 MERGE FRAMES |
------------------------
- Menu-item 4 (NEXT FRAME) is the most often used, and
is the default item accessed when the user hits .
It allows the user to display pictures one after the other.
- Menu-item 1 (EXIT) stops the program.
- Menu-item 2 (NEW INPUT FILE) may be selected for a new run,
and the user will be asked to give the filename of the next
input metafile to be displayed. It can also be used to
rewind the same input metafile (by giving the same input-filename)
in order to go backward in the metafile.
- Menu-item 3 (SKIP FRAMES) allows the user to skip a certain number of
frames in the input-metafile by answering the question: "How many frames do
you want to skip ?".
- Menu-item 5 (SELECT FRAME) allows the user
to select one specific frame by giving its name.
The frames in the input metafile must contain frame-names specified either
when the metafile was created (using the CERN function GCNAME),
or after metafile conversion with GRCONV.
- Menu-item 6 (LIST NAMES) lists all frames which are in the
input metafile (with their order number followed by their name
if any), and the user can select any of the frames following the
current one using the mouse (or arrow keys).
- Menu-item 7 (MERGE FRAMES) allows the user to pack several
pictures into one.
The user is asked how many frames to merge in the X and Y
directions, and if the frames should be listed (as in "LIST NAMES")
in order to select the ones to be processed.
If not (answer is "N") the following consecutive frames from the metafile
are automatically processed one after the other.
- Menu-item 5 can be used only when NAMES option is selected.
- Menu-item 6 can be used only when NAMES or NBFR option
is selected.
- GRVIEW without any options does not make use of any internal picture
storage. It will run more efficiently and there should not be
any restriction on the size of the metafile-input.
Example 2: COPY Option, with OUTPUT and OTYPE qualifiers
- Syntax:
- GRVIEW fn ft fm (COPY TERM termtype OUT fno fto fmo OTYPE type
- GRVIEW filename/COPY/TERM=termtype/OUT=filename/OTYPE=type
- grview filename -copy -term termtype -out filename -otype type
- (On IBM/VM, VAX/VMS, and Apollo).
This command can be used to look at the pictures contained
in an input metafile, and to decide whether or not some of
the frames are to be copied onto an output file (a metafile,
PostScript, or Tektronix file, etc.).
If when using the COPY option any of the mandatory parameters (TERMTYPE,
OUTPUT or OTYPE) is missing, then the user is prompted interactively
for them. On the other hand, use of one of the qualifiers OUTPUT or OTYPE
automatically selects the COPY function.
The user will be presented with the following menu:
------------------------
| 1 EXIT |
| 2 NEW INPUT FILE |
| 3 SKIP FRAMES |
| 4 NEXT FRAME () |
| 5 SELECT FRAME |
| 6 LIST NAMES |
| 7 MERGE FRAMES |
| 8 COPY FRAMES |
| 9 EDIT |
------------------------
The first 7 menu-items have the same functionality as explained
previously and the additional two items are:
- Menu-item 8 (COPY FRAMES) allows the user to copy several frames
to the output file by answering the question: "How many frames do you
want to copy?".
- Menu-item 9 (EDIT) enables use of the editor (which can also be
accessed directly with command-level option "EDIT").
In comparison with GRVIEW without any option, the main difference in using
the COPY option is that these two extra menu-items are provided, and
that for each picture displayed the user will be presented with the COPY menu:
------------------------
| 1 NO COPY |
| 2 COPY |
| 3 COPY (RESIZE) |
------------------------
If the user decides to copy the frame to an output metafile using
menu-item 2 "COPY" or 3 "COPY (RESIZE)" the program will prompt for
a name to be given to the frame if none was given initially.
Menu-item 3 "COPY (RESIZE)" allows the user to change the viewport
The aspect ratio is maintained, which conforms to the GKS standard.
and therefore the physical size of the picture.
Example 3: EDIT Option
- Syntax:
- GRVIEW fn ft fm ( EDIT (on IBM/VM), or GRVIEW ( EDIT ,
- GRVIEW filename/EDIT (on VAX/VMS), or GRVIEW/EDIT ,
- grview filename -edit (on Apollo), or grview -edit.
The EDIT option allows the user to access directly the editing part
of GRVIEW without using a menu-item.
If the user gives a command including the name of an existing metafile
then it is possible to edit any frame taken from
this input metafile. Otherwise, if no input filename is given in the command,
the editor will be entered directly in order to produce a completely new
picture.
In the first case the user will be presented with the following menu:
------------------------
| 1 NEXT FRAME |
| 2 SELECT FRAME |
| 3 LIST NAMES |
| 4 EDIT NEW |
| 5 BACK TO GRVIEW |
------------------------
- Menu-item 1 (NEXT FRAME) allows the user to edit the next frame
which is on the input metafile,
- With menu-item 2 (SELECT FRAME) or 3 (LIST NAMES) the user
can select the frame to be edited.
For menu-item 2 the user has to give the frame-name (possible
only if the input metafile contains frame-names), and for
menu-item 3 the mouse (or arrow keys) may be used for selection.
- With menu-item 4 (EDIT NEW) the user can edit a completely new picture.
- Menu-item 2 can be used only when NAMES option is selected.
- Menu-item 3 can be used only when NAMES or NBFR option
is selected.
Metafile Editing with GRVIEW
This chapter provides a short description of the editing part of GRVIEW,
which can be invoked either with the EDIT option, or through the
menu item 9 "EDIT" (available when an output file is requested or
the COPY option is selected). This description does not attempt
to cover every possible detail: that would take too much space,
and might be too discouraging!
Users must try the editor for themselves to become familiar with it.
The editor is a fully interactive program which provides many
messages in order to help the user, and control is normally
through the use of menus with input via a mouse.
Terminals with arrow keys work also, but are much less convenient.
Note that if the application which produced the input metafile
stored primitives in segments, then the original assignment of
primitives to segments will be respected.
However, for primitives outside segments, the GRVIEW editor
will assign each primitive to a separate segment.
The editor provides the possibility to group segments
so that, for example, moving one primitive or segment
in a group moves the whole group, and groups may later be split.
To use the editor effectively at least a rudimentary knowledge of GKS
is required. For example, one should read the GKS/GKS-3D Primer
(CN/US/110), available from the UCO.
Top Level (Main) Menu
This menu is accessed directly when editing a frame taken from an
existing input metafile and must be used in order to exit from the
editor ("quit editor").
It gives access to basic functions, such as "clear screen" and
"redraw screen", as well as to sub-menus which allow the user
to "add primitives", "transform segments", and "group segments".
PostScript image of
top level menu
"Redraw screen" may be useful during an editing session, especially
when things have been deleted in the original picture. This allows
the user to clean up the image and see the correct state of the
stored picture on the screen.
"Copy" and "Delete segments" can be used to copy or delete some
part of the initial picture in the case that the metafile already contains
segments which were generated with the GKS calls to GCRSG (CReate SeGment)
and GCLSG (CLose SeGment).
For a completely new picture each primitive is put
automatically into a separate segment.
"Hardcopy" can be selected to switch off menu information in order
to get a clean hardcopy of the frame on an attached screen-copy printer.
"Load from metafile" allows the user to load the next
frame contained in the input metafile.
If the screen is not empty the user is asked to confirm whether the frames
really should be superposed. If not, then the current picture should be
saved on the output file if one wants to keep it
(by selecting "Save on output"), then "Clear screen" selected before
loading the next frame.
The user may not want to edit the next consecutive frame, but
a frame further down the metafile.
In that case there are two possibilities: either to select
"Load from metafile" and "Clear screen' for each frame until
arriving at the one required, or to leave the editor ("quit editor")
and re-select menu "edit".
"Save on output" MUST be selected at the end of the editing
session
For a long editing session we strongly advice the user to do this
from time to time...
in order to write the picture onto the output file,
otherwise the session will be lost.
Add Primitive Menu
This menu is entered directly when editing a completely new picture
(no input metafile given in the command or "EDIT NEW" selected).
It gives access to all the GKS primitives
("POLYLINE", "POLYMARKER", FILL AREA")
and their attributes through sub-menus corresponding to each primitive.
It also provides access to some simple pre-defined symbols
("BOX", "CIRCLE", "ARC", "ELLIPSE") and some more complicated
ones via "PICTURE".
PostScript image of
add primitive menu
Menu "SET GRID" can be used to provide a grid of dots
in order to assist the user to position primitives more accurately.
When the user selects a position then GRVIEW automatically takes
the X and Y coordinates of the nearest grid point. A sub-menu
allows the user to choose the grid-scale.
"QUIT" has to be selected to go back to the top-level menu.
Transform Segments Menu
This gives access to different functions in order to
modify ("copy", "move", "delete", "scale-rotate") some part of
the picture (see Figure).
The functions provided by this menu act on the all the
primitives which are part of the same "group of segments"
(see below).
PostScript image of
Transform Segments Menu
It is possible to "zoom" the picture (change the scale) in
order to work with more accuracy. "Change segments" and "Change
primitives" give access to sub-menus in order to change the
value of the attributes. "Delete Primitive" must be used if the
user wants to delete one specific primitive from one group of segments.
Group Segments Menu
Initially, for a new or existing picture, each segment must be manipulated
individually. However, in GRVIEW it is possible to add segments together in
order to form a group which may be manipulated as a single unit.
The concept of a group of primitives does not exist in GKS,
which has only a single level of structuring possible and where no
provision is made to alter the contents of a segment once it has
been built. Thus, in the GRVIEW editor, this feature has been
built on top of GKS.
The user will need to experiment with groups a little to become
accustomed to their use, but will find them very useful.
For example, one might draw a house consisting of walls, a roof,
windows, and a door. In order to re-position the house it is
essential to place all its primitives in a group so that they
may be moved as a single unit.
PostScript image of
Group Segments Menu
Primitive Attributes
The following lists the menus available to manipulate attributes.
Control of the Editor
To control the editor three sub-menus can be displayed,
depending on the action executed by the user:
- A menu RETURN (with only one choice) allows the
user to go back to the calling menu after an operation has been
performed one or several times.
- A menu with the two choices DRAW/QUIT (see
) allows the user either to validate
one or several times the drawing of a primitive when an undefined
number of points is requested (e.g. for polyline, fill-area or
polymarkers), or to go back to the calling menu to perform another
type of operation.
PostScript image of
DRAW/QUIT Panel
- A menu with the two choices CONFIRM/CANCEL (or QUIT)
(see ) is displayed when, perhaps for safety,
the type of operation to be performed requires confirmation from the
user. One example would be that for any kind of segment manipulation
the user is asked to confirm that the segment picked is the
correct one (the picked segment is
highlighted if highlighting is supported by the display).
Another example is when the menu-item "load from metafile" is selected
to display the next frame which is on the input-metafile but a "clear screen"
action has not been performed to clear the display. In this case the user
is asked
whether or not the two frames really should be superposed.
PostScript image of
CONFIRM/CANCEL Panel
Usage Notes
The following consists of some hints and general remarks which
might help the user to avoid various problems:
- The menu-item "quit" which appears in many sub-menus has to be used
in most cases to go back to the parent menu.
- It sometimes happens that the menu-item "draw" has to be selected
several consecutive times in different sub-menus in order to confirm the
execution on an operation
(this is a "feature" which we hope to improve in a later release).
- HPLOT and PAW users should note that with the default font and
precision text is drawn with "polylines"
by HIGZ. This has several consequences. For example, apart from
taking up more space in the metafile, and being slower to draw, it
means that the normal GKS text attributes, such as font, and text
height, etc, do not apply to HIGZ 'text', and so cannot be changed
with the GRVIEW editor. However, the colour of HIGZ
text can be changed via the polyline colour attribute.
- Before finally exiting from the editor ("quit editor") the user is
asked "Do you really want to quit ?", for example, in case the picture
has not been saved.
Hitting produces the default answer "Y" (Yes).
Metafile Conversion with GRCONV
GRCONV is a general command which may be used
to convert a graphics metafile into another format, usually
an intermediate plot-file to send to a printer, or into a second
metafile in which a selection of pictures has been made.
GRCONV provides for output to PostScript, Encapsulated Postscript,
IBM-3812 Bit Maps, Tektronix 4014 and HPGL escape codes.
The first three of these may be used either simply for printing,
or so that the pictures may be incorporated into documents
produced by TEX, SGML or Bookmaster
Previously, the old SGML/Script format was provided by the
GKSSGML command, which is now obsolete.
or TeX.
GRCONV is usable on any alphanumeric terminal, which
is a major difference with GRVIEW, and does NOT require the use of a
graphics display. It can be used:
- Interactively: Then the user is asked for all
mandatory parameters which were not specified on the command line.
It is also possible to ask to select the frames to be converted
individually, otherwise all frames from the input-metafile are
processed (the default case).
- Through a Batch session: Then GRCONV cannot
interact with the user, and all options (or parameters) must
be given on the command line. If any mandatory parameter is missing
then the job is stopped with an error message. To initiate a batch
Experienced users who know exactly the content of their
input metafile are strongly advised to use GRCONV in batch.
processing the user has to specify the option "BATCH"
(see ).
General Format
The format of the GRCONV command is, according to the system used:
- Syntax:
- GRCONV fn ft fm ( OPTIONS [VALUE] (on IBM/VM),
- GRCONV filename/QUALIFIERS[=VALUE] (on VAX/VMS),
- grconv filename -options [value] (on Apollo
Commands and file names are case sensitive under Aegis and UNIX.
).
The filename (fn ft fm on VM) of the metafile to be plotted is a
mandatory parameter and if it is missing the user will be prompted
for it. This will be done via a panel if using a full screen terminal
on CERNVM.
Not all options can be accessed on any machine. The following is a list
of possible options/qualifiers with their meaning.
Mandatory Parameters
These are the parameters which must be provided on the command line.
If any of them are missing during the start of an interactive session
the user is prompted for them. For a batch session all these
parameters HAVE to be given, otherwise the job is stopped with an error
message. The mandatory parameters are:
- the input-filename of the metafile to be converted,
- the output-filename
If missing from a BATCH session, the name and file type
"GRCONV OTYPE" is automatically given to the output file on VM/CMS.
On other systems the name and extension is set to "GRCONV.OTYPE".
of the file resulting from conversion,
- the output format, or output filetype: PostScript,
Tektronix, metafile, SGML, BOOKM, etc.
INPUT filename
This is the name of the input metafile to be converted. It must
appear as the first parameter in the command on IBM/VM and Apollo
(no restriction on VAX/VMS).
- Syntax:
- GRCONV MYFILE METAFILE A (on IBM/VM),
- GRCONV MYFILE.METAFILE (on VAX/VMS),
- grconv myfile.metafile (on Apollo).
OUTPUT filename
Qualifier OUtput followed by a filename must be used to specify the name
of the output file produced after conversion.
- Syntax:
- GRCONV ( OUT MYOUT POST C (on IBM/VM),
- GRCONV/OUT=MYOUT.POST (on VAX/VMS),
- grconv -out myout.post (on Apollo).
When option SPLIT (see ) is selected, or output
type SGML, BOOKM or EPS (see ) is requested, then one
output-file per frame is produced. The "output filenames" are chosen
according to specific rules and the qualifier OUTPUT should be
omitted (or is ignored).
OTYPE filetype
Qualifier OType followed by a value must be used to specify
the type of the output file resulting from the conversion.
The list of allowed values for OTYPE
N.B. Not all values for OTYPE may be accessible on every system.
is:
- METafile
- GKSGRAL metafile.
- MAE2DO
- idem.
- POStscript
- PostScript Portrait Monochrome.
- EPS
- Encapsulated PostScript (Portrait Monochrome) for inclusion into
a document.
- PSTPM
- (or EPSPM) idem.
- PSTLM
- (or EPSLM) PostScript Landscape Monochrome
- PSTPC
- (or EPSPC) PostScript Portrait Colour
- PSTLC
- (or EPSLC) PostScript Landscape Colour
- TEKtronix
- Tektronix 4014 escape codes (e.g. for LN03 printers)
- T4014
- idem
- BOOKM
- PSEG3820 for IBM 3812-compatible printers, or inclusion in
SGML/Bookmaster documents.
- SGML
- PSEG38PP for inclusion in SGML/Script documents to be printed on
an IBM 3812 compatible printer.
- HPGLP
- HPGL A0 Portrait
- HPGLL
- HPGL A0 Landscape
- Syntax:
- GRCONV ( OTYP postscript (on IBM/VM),
- GRCONV/OTYP=postscript (on VAX/VMS),
- grconv -otyp postscript (on Apollo).
-
Users who wish to incorporate pictures in SGML documents on
the IBM-3812 should use either the parameter SGML (for the
old SGML/Script format), or BOOKM, for the new SGML/DCF format
(Bookmaster
is based on DCF). The main difference that the user will see is that,
in the first case, PSEG38PP files are produced, whereas, in the second
case, it is PSEG3820 files (the new format requested by IBM
3812-compatible printers). In the first case an additional control
file (with filetype SGML) is also produced and is used by the
SGML/Script processor to reserve space within the document for each
picture.
-
If IBM3812 or SGML output format is selected then the conversion must be
performed
on CERNVM. If the current host is a VAX or an Apollo connected to the computer
centre via a network link, then the job to convert the metafile is sent
to CERNVM automatically (see section ).
-
For IBM-3812 or SGML the output is not placed into a single file,
but each frame is stored in a separate output file. In fact,
in the case of SGML, each output picture file has an ancillary file
This ancillary file is not used by the BookMaster processor
and eventually will be suppressed.
which defines the picture size, and which is used by the
Waterloo/Script version of SGML.
The VM output file names are GR$$00nS SGML and GR$$00nP PSEG38PP
(with n equal to 1, 2, etc...) if the frames have not been named,
or else XXXXXXXS SGML and XXXXXXXP PSEG38PP, where XXXXXXX is the
seven character frame name defined by the call to GCNAME in the
application which wrote the metafile. If the name has less than seven
characters it is padded with $ (dollar) characters as necessary.
-
For EPS (Encapsulated PostScript) one output file per frame should
normally be produced, as this output format is designed specifically
for the inclusion of pictures within a document.
This can be achieved by using the SPLIT option,
and the naming scheme is described in section .
Note that if OTYPE EPS is requested and SPLIT was not specified in the
command then the program allows the user to select it afterwards.
For more information on how to include pictures inside a document
users should refer to the Guide to Computer Graphics at
CERN (CN/US/111).
Optional Parameters
These are different qualifiers which the user can specify to enable
specific options, but in all cases a default is provided.
BATCH is an example of an optional parameters: if option BATCH is
not specified in the command then the session by default is interactive.
The following is a list of all the optional parameters provided by
GRCONV with their meaning.
LOGFILE filename
Qualifier LOgfile followed by a filename must be used to specify the name
of the logfile produced by the run. This is, by default,
GRCONV LOG A (on VM) and GRCONV.LOG (on other systems).
The logfile contains all error messages coming from GKS or from the
program itself. If the BATCH option is selected then the logfile
contains also the whole run description.
- Syntax:
- GRCONV ( LOG myconv log c (on IBM/VM),
- GRCONV/LOG=myconv.log (on VAX/VMS),
- grconv -log myconv.log (on Apollo).
BATCH
Qualifier BAtch must be selected to initiate a batch session:
no interactive
input at all is requested from the user. If a mandatory parameter
is missing in the command the job is stopped and the user
will find an error message in the logfile.
If option BATCH is not specified then the session by default is
interactive.
If the option FRAMES is selected (see section )
with BATCH mode then a list of frames to be converted may be specified,
otherwise the whole input metafile is processed.
This is different to the use of GRCONV without the BATCH option,
which interactively prompts the user to find out which frames to process.
On IBM/VM the job is submitted to the BATCH machine, on
VAX/VMS the job is sent to a batch queue (see option QUEUE described
in section ), and on Apollo the command is put
into a background process.
The BATCH option does not require any value.
- Syntax:
- GRCONV ( BATCH (on IBM/VM),
- GRCONV/BATCH (on VAX/VMS),
- grconv -batch (on Apollo).
The BATCH option can also be used in order to suppress any user
input, especially when calling GRCONV from another command (an EXEC
file on IBM/VM, or a DCL command-file on VAX/VMS). Nothing special
is required on VM except for those users who would like to suppress
all messages coming from the FORTRAN program: in that case, they
should add in their EXEC the CMS commands "SET CMSTYPE HT"
just before the call to GRCONV, and "SET CMSTYPE RT" just after it.
On VAX/VMS users should also specify the qualifier
"/NOQUEUE" (see section ).
Default output file naming:
The output filename is given either in the command
(OUTput option) or a name is chosen automatically as follows:
- If the option SPLIT (see ) is NOT selected there
is only one output file produced with name:
GRCONV OTYPE FMO (or GRCONV.OTYPE), where OTYPE is the output
type given in the command (METafile, POSTscript, TEKtronix,
MAE2DO, PSTPC, ...).
On VM the output filemode is 'A' by default if it is not specified
with qualifier FMO.
- If SPLIT is selected each frame is put into a separate output file
with the name: FNAME OTYPE FMO, where FNAME is the frame name if one has
been defined (by calling GCNAME in the application which created the metafile).
If the input metafile frames were not named, then the files are called
FRAM001, FRAM002, etc...
SPLIT
The qualifier SPlit provides a way for the user to decide whether all
the converted frames should be kept together in the same output file
(the default),
or if a separate output-file should be produced for each frame.
The SPLIT option can be useful if one wishes to incorporate pictures
inside a document using a text-processing system, such as
SGML/Bookmaster or TeX, which requires
each picture to be stored separately.
The SPLIT option does not require any value.
- Syntax:
- GRCONV ( SPLIT (on IBM/VM),
- GRCONV/SPLIT (on VAX/VMS),
- grconv -split (on Apollo).
On VM the name given to each output file is FNAME OTYPE FMO where FNAME is the
corresponding frame name, OTYPE the output file type (given in
the command/panel or
interactively) and FMO the output file mode (if not given in the
command/panel this is A by default).
On other systems the name of each file is FNAME.OTYPE.
For an interactive session if the input metafile does not
contain frame names, or if option FAST (see ) is
selected, then whatever the output file type is the user is asked
to give a name to the frames selected for conversion.
For a batch session the names FRAM001, FRAM002,... are generated
automatically for the output files produced.
GKS metafiles are sequential files. Thus, some information stored
at the beginning of the file, concerning attributes for instance,
may be required for all frames. In order to SPLIT the input-metafile
the program needs firstly to REWIND it for each frame to restore the
initial conditions.
This is why the user gets for each frame except the first one the message:
"Rewinding the whole metafile ... Please be patient".
FRAMES f1 f2 f3
The qualifier FRames followed by a list of integers
allows the user to select the frames to be
processed by giving their position number in the input metafile.
Thus, f1 f2 f3 are the order numbers of the frames to be converted.
For example, to process only the 2nd, 5th and 7th frames, use
FRAMES 2 5 7
.
This will increase the speed of the process if the user does not
need to convert the whole metafile.
- Syntax:
- GRCONV ( FRAM 2 5 7 (on IBM/VM),
- GRCONV/FRAM=(2,5,7) (on VAX/VMS),
- grconv -fram 2 5 7 (on Apollo).
Up to 20 frame numbers can be entered following the FRAMES
keyword. If more than 20 numbers are given they are ignored and a warning
is issued.
FAST
The qualifier FAst may be used to avoid reading the input metafile
to check the number of frames and their names.
When FAST is NOT selected the whole metafile is read in order to
count the frames and to make a list of their names.
This allows for a nicer user interface, for example users can have
displayed the names of the frames on the metafile, but can be a slow
process if the metafile is large.
Note that the use of this option is equivalent to the default
case in GRVIEW.
The FAST option does not require any value.
- Syntax:
- GRCONV ( FAST (on IBM/VM),
- GRCONV/FAST (on VAX/VMS),
- grconv -fast (on Apollo).
When FAST is selected an empty frame might be created at the end of the
output file if there is a CLEAR WORKSTATION
just before the end of the input file. The reason is that with
option FAST the program does not check to see whether there is actually
any data after the last CLEAR WORKSTATION
, which is the signal
to generate a new frame.
STOP value
The qualifier STop may be used to set the maximum number of
GKS errors allowed before processing is stopped.
This can save both wasted CPU time, as well as the disk space
used to store the log file.
Thus, "STOP n" means that after n errors the job will end.
If STOP is set to 0 then the option has no effect and the job
will not stop regardless of the number of errors. The default value for
STOP is 50 on all systems.
- Syntax:
- GRCONV ( STOP 20 (on IBM/VM),
- GRCONV/STOP=20 (on VAX/VMS),
- grconv -stop 20 (on Apollo).
STOP is ignored if option BATCH (see ) is selected.
FMO filemode (VM only)
The qualifier FMo followed by a valid filemode allows the user to change
the filemode of the output file produced (this is A by default).
- Syntax:
- GRCONV ( FMO B (on IBM/VM).
JOBNAME name (VM only)
The qualifier JOBNAME can be used to set the batch job name on VM.
In any case a default is provided by the system.
- Syntax:
- GRCONV ( JOB myjob (on IBM/VM).
CLASS class (VM only)
The qualifier CLASS followed by a valid value has to be used in
order to set the batch job class. If a class is entered, no checks
are made on the size of the metafile and/or on the
validity of the class itself. If the class is not a valid one
or does not allow for enough time, the batch job will fail.
If CLASS is not given the following rule is used:
- Metafiles of up to 8000 lines: class S
- between 8000 and 50000 lines: class M
- 50000 lines and over: class L
- Syntax:
- GRCONV ( CLASS S (on IBM/VM).
- Type FIND BATCH_CLASS on VM for the list of available classes.
- Users must be aware that batch jobs with class L run overnight!
QUEUE queue-name (VAX/VMS only)
Qualifier QUeue followed by a valid name
allows the user to define the queue to which the job
should be sent when option BATCH is selected.
The queue name is system-dependant, and the default on VXCERN is
SYS$SHORT.
- Syntax:
- GRCONV/QUEUE=SYS$MEDIUM (on VAX/VMS).
/QUEUE=NO can be used in conjunction with /BATCH in order
to have a non-interactive run (no input requested from the user)
without the job being put into a batch queue. This
might interest people who would like to make use of the
GRCONV command in their own DCL command file.
SGML Output
The qualifier OTYPE SGML (/OTYPE=SGML on VAX, and -otype sgml on
Apollo) has to be used to convert GKS metafiles into a form suitable
for inclusion in an SGML document using the "PICTURE" tag.
The frames are output into separate files, and the details
of this are described in the note in section .
Users should be aware that if SGML output is selected when using a
computer system at CERN other than CERNVM, then a batch job will be
sent automatically to CERNVM to perform the conversion.
Therefore it must be possible to access a VM/CMS minidisk
WITH a write password (the qualifier PASSWORD MUST be given,
VMUSERID should be given if different from the VAX one, and
ADDRESS if the minidisk is not 191).
Any output files produced will remain on CERNVM and will NOT be sent
back to the originating host. Only the logfile of the VM batch job is
returned, and on VXCERN users may access it by typing "RDRLIST" and
selecting the number of the corresponding file.
An error message will be displayed if the connection
to CERNVM is not available, and the response time clearly will be affected
by the load on both CERNVM and the network.
The qualifiers OUTPUT, LOGFILE, SPLIT, FAST, PROMPT and STOP are
ignored for SGML output.
The following is a list of qualifiers specific to SGML output.
Apart from XFACT and YFACT, available on any systems, the other
qualifiers are for hosts in order to communicate with CERNVM.
XFACT number
Qualifier XFact followed by a number can be used to scale the
picture in X by this number (multiplicative).
YFACT number
Qualifier YFact followed by a number can be used to scale the
picture in Y by this number (multiplicative).
VMUSERID userid (VAX and APOLLO only)
Qualifier VMuserid followed by a valid VM userid can be used on other
systems than CERNVM in order to specify which VM account to use.
The default value for VMUSERID is the same user name that is being
used on the host (VAX or Apollo).
ADDRESS number (VAX and APOLLO only)
Qualifier ADdress followed by a valid number must be used to
specify the address of the minidisk on CERNVM to which the converted
files will be written. One must have a write password on
this disk and it must not be accessed by any other user (e.g.
YOU if you are usually GONE !). The default value is 191.
Note that one must give also the PASSWORD value associated with
this minidisk.
PASSWORD value (VAX and APOLLO only)
Qualifier PAssword must be used to pass the value of the write
password on the CERNVM minidisk to which the converted files will be
written.
TIME number (VAX and APOLLO only)
Qualifier TIme can be used to set the time in minutes for the
batch job which will run on CERNVM. The default is 2 minutes.
Examples
Example 1: No Options
- Syntax:
- GRCONV meta dat (on IBM/VM),
- GRCONV meta.dat (on VAX/VMS),
- grconv meta.dat (on Apollo).
This command converts the input metafile META DAT (META.DAT).
The run is fully interactive: the user is asked to give
all mandatory parameters (such as the output filename and type).
For a conversion into an output metafile the user is asked also
to give a name to each picture in the case that no names have been given
during creation of the input metafile via a call to the CERN utility
GCNAME.
The following is the console logfile produced on VM (user answers
are enclosed with brackets).
The user interface is similar on other systems (VAX and Apollo).
GRCONV META DAT
CRNGKP016I GRCONV: Execution begins ...
*******************************************************
*** GKS METAFILE CONVERSION UTILITY VERSION 1.0 ***
*** VM/CMS ***
*******************************************************
grconv> GIVE OUTPUT TYPE : (=1)
grconv> METAFILE=1 POSTSCRIPT=2 ... [1]
grconv> Getting frames names ... Please be patient !
grconv> Option SPLIT is NOT selected :
grconv> All selected frames will be put in the same OUTPUT file
grconv> You have 4 frames on your input file.
grconv> Frames do not have NAMES.
grconv> Do you want to select frames to convert (Y/N) ?
(N.B. =N --> all frames are converted) ... [Y]
grconv> PLEASE GIVE OUTPUT FILE ( NAME TYPE [MODE] ) :
... [OUT META N]
grconv> Frame 1 *NONAME : convert ? (Y/N) (=Y)
... [N]
grconv> ... Skipping frame 1 *NONAME
grconv> Frame 2 *NONAME : convert ? (Y/N) (=Y)
... [ ]
grconv> Give frame name (MAX 7 alpha-numerics chars.), for frame nb: 2
... [FRAM2]
grconv> Copying frame 2 : FRAM2
grconv> on file : OUT META N
grconv> Frame 3 *NONAME : convert ? (Y/N) (=Y)
... [N]
grconv> ... Skipping frame 3 *NONAME
grconv> Frame 4 *NONAME : convert ? (Y/N) (=Y)
... [Y]
grconv> Give frame name (MAX 7 alpha-numerics chars.), for frame
nb : 4
... [FRAM4]
grconv> Copying frame 4 : FRAM4
grconv> on file : OUT META N
grconv> *******************************************************
grconv> *** RUN DESCRIPTION ***
grconv> *******************************************************
grconv> NR. OF FRAMES READ : 4
grconv> FRAMES WRITTEN TO OUTPUT : 2
grconv> NR OF GKS-ERRORS FOR THIS RUN: 0
Example 2: SPLIT, FRAMES and OTYPE
- Syntax:
- GRCONV meta dat (SPLIT FRAM 3 4 OTYP POS (on IBM/VM),
- GRCONV meta.dat/SPLIT/FRAM=(3,4)/OTYP=POS (on VAX/VMS),
- grconv meta.dat -split -fram 3 4 -otyp pos (on Apollo).
This command converts frames numbers 3 and 4 from the
input metafile META DAT (META.DAT) into two separate (SPLIT) PostScript
files (portrait/monochrome). The session is interactive:
output files produced will have the same name as the frame-names
if names have been given at metafile creation, otherwise
the user will be asked to give a name to each picture and this name
will be used for the output files produced (with filetype
or file-extension POS).
Example 3: FRAMES, OTYPE, OUT, BATCH and FAST
- Syntax:
- GRCONV meta dat (FRAM 3 4 OTYPE PSTPC OUT OMETA PS BATCH FAST
- GRCONV meta.dat/FRAM=(3,4)/OTYPE=PSTPC/OUT=OMETA.PS/BATCH/FAST
- grconv meta.dat -fram 3 4 -otype pstpc -out ometa.ps -batch -fast
- (On IBM/VM, VAX/VMS and Apollo).
The user asks the job to run in BATCH and to convert frames
numbers 3 and 4 from the input metafile META DAT (META.DAT)
into one PostScript file (portrait/colour) with filename OMETA PS
(OMETA.PS).
The job will run in the batch machine on VM, it will be
put by default in the batch queue SYS$SHORT on VXCERN, and it will
run in a background process on Apollo.
The qualifier FAST has been selected to make the run faster
(no check is made concerning the number of frames and their names
in the input metafile).
This is a part of the logfile produced by the batch job on VM
(containing the run description):
*******************************************************
*** GKS METAFILE CONVERSION UTILITY VERSION 1.0 ***
*** VM/CMS ***
*******************************************************
grconv> - Option PROMPT is ignored (BATCH selected).
grconv> - Option STOP is ignored (BATCH selected).
grconv> Option SPLIT is NOT selected :
grconv> All frames after conversion will be put in the same
OUTPUT file OMETA PS A
grconv> Option FAST has been selected. This means that
grconv> no names LIST/CHECK is done for the input metafile.
grconv> The last frame to be processed is frame nb : 4
grconv> ... Skipping frame nb 1
grconv> ... Skipping frame nb 2
grconv> Copying frame nr. 3
grconv> on file : OMETA PS A
grconv> Copying frame nr. 4
grconv> on file : OMETA PS A
grconv> *******************************************************
grconv> *** RUN DESCRIPTION ***
grconv> *******************************************************
grconv> NR. OF FRAMES READ : 4
grconv> FRAMES WRITTEN TO OUTPUT : 2
grconv> NR OF GKS-ERRORS FOR THIS RUN: 0
Metafile Plotting with GRPLOT
GRPLOT is the general command to be used at CERN in order to print
a GKS metafile on a printer or plotter.
Interactive HELP is available on all Computer Centre systems.
If you have any problems with GRPLOT which cannot be resolved by the UCO,
or any suggestions for improvements, please contact
n.cremel@cern.ch.
GRPLOT currently supports the following devices:
- XEROX 4050 printer
- IBM 3812 laser printers
- VERSATEC monochrome and colour plotters
The XEROX 4050 should be used for production work (large metafiles).
It is also the printer which gives the best resolution and quality
for black and white output. The VERSATEC colour A0 plotter can be
used for very large outputs, and the VERSACOLOR A4 plotter should be used
for publication only (for cost reasons).
The GRPLOT command exists on all CERN centrally supported systems
(IBM/VM, VAX/VMS, Apollo). If the printer/plotter to which the output is
directed is not connected to the machine being used,
Note that at Cern, and for the moment, most printers/plotters are
connected to IBM/VM. This explains why, in the following, we are
using several times a VM specific terminology, especially relating
to "VM batch jobs".
then GRPLOT will transfer the metafile to the correct destination
automatically, where it will be processed as a batch job.
General Format
The format of the GRPLOT command is, according to the system used:
- Syntax:
- GRPLOT fn ft fm ( OPTIONS [VALUE] (on IBM/VM),
- GRPLOT filename/QUALIFIERS[=VALUE] (on VAX/VMS),
- grplot filename -options [value] (on Apollo
Commands and file names are case sensitive under Aegis and UNIX.
).
The filename (fn ft fm on VM)
On VM "METAFILE" is used by default for the filetype.
of the metafile to be plotted is a mandatory parameter and if it
is missing the user will be prompted for it. This will be done via
a panel if using a full screen terminal on CERNVM.
Not all options can be accessed on any device or machine. The following
is a list of possible options/qualifiers with their meaning.
General Parameters
PRINTER printername
PRintername is the name of the printer/plotter to be used.
Only the following printer/plotter types are valid:
- XEROX 4050 Printer (printername is XEROXDD for the one in building
513),
- VERSATEC colour A0 Plotter (printername is A0COLOUR),
- VERSACOLOR A4 Plotter (printername is A4COLOUR for the one in
building 513),
- IBM3812 Printers (printername is DD513A for the one in building
513).
For other printers of these types (e.g. IBM-3812s) the printername should
be a nickname entry in the USERPRT, GROUPPRT or SYSPRT NAMES files on VM.
If printer A4COLOUR
Users should be aware that the cost of the material is not
insignificant, being about CHF 1 for a copy on white paper, and
CHF 3 for a transparency. Thus, users should test one or two
plots first, before producing a more substantial number.
is chosen GRPLOT generates and submits a batch
job to plot the metafile on the VERSACOLOR plotter in
building 513. The processed job is queued for plotting and the user
must go to the machine in order to release the job using the local
terminal.
- Syntax:
- GRPLOT fn ft fm ( PRINT DD513A (on IBM/VM),
- GRPLOT filename/PRINT=DD513A (on VAX/VMS),
- grplot filename -print dd513a (on Apollo).
Performance considerations:
- Metafiles with a large number of frames should be printed on the
XEROX as this is faster and also allows recto-verso printing.
- Metafiles with more than 10 frames sent to an IBM-3812 will be
printed in class L.
- VM Batch Jobs are sent to different classes depending on the size of
the metafile to be printed (class S, M or L). Class L runs overnight.
If the CLASS option is used, the job is run in the class given. If the
class is not a valid one or it does not allow enough time, the
job will fail.
XFACT xfact
XFact is an X-axis multiplicative scaling factor. The default is 1.00.
- Syntax:
- GRPLOT fn ft fm ( XFACT 0.75 (on IBM/VM),
- GRPLOT filename/XFACT=0.75 (on VAX/VMS),
- grplot filename -xfact 0.75 (on Apollo).
YFACT yfact
YFact is a Y-axis multiplicative scaling factor. The default is 1.00.
- Syntax:
- GRPLOT fn ft fm ( YFACT 2.0 (on IBM/VM),
- GRPLOT filename/YFACT=2.0 (on VAX/VMS),
- grplot filename -yfact 2.0 (on Apollo).
The values given for XFACT and YFACT are checked by the program
and not used if they exceed the page limits (then the maximum values
allowed and calculated by the program are taken as for ORIENT=A
or F, explained in section ).
You can "force" the values for XFACT and YFACT if you give
negative numbers (then no check is made by the program but you may
lose some part of the picture).
FRAMES f1 f2 ... fn
The FRames option allows the selection of frames to be printed,
where f1, f2, ... are the ordered numbers of the frames selected.
For instance, to print the 2nd, 5th and the 7th frame of
your metafile use the following syntax:
- Syntax:
- GRPLOT fn ft fm ( FR 2 5 7 (on IBM/VM),
- GRPLOT filename/FR=(2,5,7) (on VAX/VMS),
- grplot filename -fr 2 5 7 (on Apollo).
Up to 20 frame numbers can be entered following the FRAMES
keyword. Excess numbers are ignored and a warning is issued
JOBNAME job
Use of this option is meaningful only if the printer/plotter
is connected to the IBM,
This is true, at the moment, for most printers and plotters
at Cern.
which implies that GRPLOT will process remotely the metafile
as a batch job.
"JOb" is the name of the VM batch job and the default jobname is set
by the system. If the call to GRPLOT is done in a batch job the default
jobname consists of the first 3 characters of the user
account and the time in seconds.
If JOBNAME is used it will be printed on the banner page in
place of the userid.
- Syntax:
- GRPLOT fn ft fm ( JOB myjob (on IBM/VM),
- GRPLOT filename/JOB=myjob (on VAX/VMS),
- grplot filename -job myjob (on Apollo).
Device Dependant Parameters
DIST distcode (not for A4COLOUR)
DIst option has to be used in order to declare the distribution
code (or RIOS delivery destination) for the plotter output.
By default, on VM, it is the value stored in the user's directory
(on VM do HELP DIRM DIST if you want to change this value).
On VAX and Apollo the default DIST code is always LOCAL (Building
513).
The table of CERN distribution codes follows:
Distcode Building Rios name Distcode Building Rios name
LOCAL 513
X0 582 WH X1 2 OC
X2 4 SB X3 13 T2,TC
X4 112 IR X5 865 SP
X6 892 NA X7 162 TL
X8 22 NP X9 54
XA 5 XB 57
XC 6 PS XN Annecy
- Syntax:
- GRPLOT fn ft fm ( DIST X8 (on IBM/VM),
- GRPLOT filename/DIST=X8 (on VAX/VMS),
- grplot filename -dist x8 (on Apollo).
ORIENT orientcode (not for A0COLOUR)
The value given for ORient determines the orientation of the picture
on A4 cut sheets. The possible values are device-dependent:
- XEROX:
- A combination of the characters P or L (for Portrait or
Landscape), either A or F (for Automatic Filling of the page), and 1 (for
"one side printing") is allowed. Note that if "1" is not selected,
which is the default situation, plots are put on both sides of the
page in order to save paper. "Automatic Filling of the page" or
"Automatic scaling" means that scaling factors XFACT and YFACT are
calculated by the program and applied in order to fill the page.
In that case the aspect ratio of the original picture is not
necessarily kept. The default value for ORIENT is "P". Note that
"A" or "F" are totally equivalent and they have the same meaning
as "PA" or "PF" (Portrait orientation and Automatic Filling of the
page).
Note also that "ORIENT A" in GRPLOT does not have the same meaning
as in the old utility GKSX87.
- A4COLOUR:
- Only P and L are valid values. The default is P.
- IBM3812:
- A combination of the characters P or L, A or F is
allowed (same meaning as for the XEROX). The default is P.
This is the list of all possible combinations for ORIENT (but
not all values may be usable on all printers):
- P
- Portrait (default for all devices).
- L
- Landscape.
- A or F or PA or PF
- Portrait and Automatic scaling.
- LA or LF
- Landscape and Automatic scaling.
- P1
- Portrait and one side printing.
- L1
- Landscape and one side printing.
- P1A or P1F
- Portrait, one side printing and Automatic scaling.
- L1A or L1F
- Landscape, one side printing and Automatic scaling.
- Syntax:
- GRPLOT fn ft fm ( ORIENT L (on IBM/VM),
- GRPLOT filename/ORIENT=L (on VAX/VMS),
- grplot filename -orient l (on Apollo).
CLASS class (not for A0COLOUR)
This can be used to set the batch job class. If a class is entered
no checks are made on the size of the metafile and/or on the validity
of the class itself. (See section for
the rules used if CLASS is not given.)
- Syntax:
- GRPLOT fn ft fm ( CLASS S (on IBM/VM),
- GRPLOT filename/CLASS=S (on VAX/VMS),
- grplot filename -class s (on Apollo).
- "INT YES" is ignored if a CLASS is given.
- Type FIND BATCH_CLASS on VM for the list of available classes.
- Users must be aware that batch jobs with class L run overnight!
MERGE value (XEROX and IBM 3812 only)
The qualifier MErge followed by an integer value can be used
to merge consecutive frames
The frames to be merged should have the same workstation
transformation (same size) otherwise the MERGE option can
give strange results.
taken from an input metafile together onto a single frame,
either to save paper, or to allow the pictures
to be compared easily.
The aspect ratio of each individual picture is not necessarily kept.
The values allowed for MERGE are 2, 3, 4, 6, 8 and 9
(5 would give the same result as 4, and 7 the same as 6).
If two or three frames are merged in portrait mode they will be placed
one above the other, and in landscape mode they will be placed
side by side.
In each case they will be expanded to fill the width of the page,
so producing a possible change in aspect ratio.
The user must decide which case gives the better result.
- Syntax:
- GRPLOT ( MERGE 4 (on IBM/VM),
- GRPLOT/MERGE=4 (on VAX/VMS),
- grplot -merge 4 (on Apollo).
XPOS xpos (XEROX only)
This option may be used to displace the origin of the plot "xpos" cm
from the
left. If not given the workstation transformation (if any) will be used.
- Syntax:
- GRPLOT fn ft fm ( PRINT XEROXDD XPOS 0.75 (on IBM/VM, for Xerox),
- GRPLOT filename/PRINT=XEROXDD/XPOS=0.75 (on VAX/VMS, for Xerox),
- grplot filename -print xeroxdd -xpos 0.75 (on Apollo, for Xerox).
YPOS xpos (XEROX only)
This option may be used to displace the origin of the plot "ypos" cm
from the bottom. If not given the workstation transformation (if any)
will be used.
- Syntax:
- GRPLOT fn ft fm ( PRINT XEROXDD YPOS 2.5 (on IBM/VM, for Xerox),
- GRPLOT filename/PRINT=XEROXDD/YPOS=2.5 (on VAX/VMS, for Xerox),
- grplot filename -print xeroxdd -ypos 2.5 (on Apollo, for Xerox).
The FOrms option is used to define the paper format. It can take one
of the following values:
- WP:
- 36 inch roll - plain paper COLOUR output (DEFAULT) ef.)
- MWP:
- 36 inch roll - plain paper MONOCHROME output
- WV:
- 36 inch roll - vellum paper COLOUR output
- MWV:
- 36 inch roll - vellum paper MONOCHROME output
- WM:
- 36 inch roll - mylar paper COLOUR output
- MWM:
- 36 inch roll - mylar paper MONOCHROME output
- Syntax:
- GRPLOT fn ft fm ( PRINT A0COLOUR FORM WP (on IBM/VM, for Versatec),
- GRPLOT filename/PRINT=A0COLOUR/FORM=WP (on VAX/VMS, for Versatec),
- grplot filename -print a0colour -form wp (on Apollo, for Versatec).
XMAX CMxxxx (A0COLOUR only)
This is to set the maximum paper length of the output (in cm) in the case
of using a Versatec plotter with rolled paper.
Plots beyond this total length will be cut. The default value is 300
centimeters. The maximum length is 3000 centimetres.
- Syntax:
- GRPLOT fn ft fm ( PRINT A0COLOUR XMAX 500 (on IBM/VM, for Versatec),
- GRPLOT filename/PRINT=A0COLOUR/XMAX=500 (on VAX/VMS, for Versatec),
- grplot filename -print a0colour -xmax 500 (on Apollo, for Versatec).
GRID [yes/no] (A0COLOUR only)
This can be used to superimpose a 1 cm grid over the total plot
up to the maximum allowed plot length. The GRID option
will be obeyed only if XMAX is defined differently from its
default value. With this option you will always receive
a plot XMAX long. If XMAX > 10 metres GRID N is enforced.
The default is GRID N.
- Syntax:
- GRPLOT fn ft fm ( PRINT A0COLOUR GRID Y (on IBM/VM, for Versatec),
- GRPLOT filename/PRINT=A0COLOUR/GRID (on VAX/VMS, for Versatec),
- grplot filename -print a0colour -grid (on Apollo, for Versatec).
CENTER [Yes/No] (IBM-3812 only)
This can be used to centre
Note U.S. spelling.
automatically the picture. The default is No.
- Syntax:
- GRPLOT fn ft fm ( PRINT DD513A CENTER Y (on IBM/VM, for IBM-3812),
- GRPLOT filename/PRINT=DD513A/CENTER (on VAX/VMS, for IBM-3812),
- grplot filename -print dd513a -center (on Apollo, for IBM-3812).
Machine (and eventually Device) Dependant Parameters
INTER Yes/No (VM using IBM-3812s only)
"INTER Y" must be specified in order to run GRPLOT interactively
instead of submitting a batch job when printing on an IBM-3812.
Note that in order to use this option you need a Virtual Machine with at
least 5M of storage (use "QUERY STORAGE" on your VM account to verify).
"INTER YES" is ignored if a batch CLASS is given.
Default is INTER NO (submit a batch job).
- Syntax:
- GRPLOT fn ft fm ( PRINT DD513A INTER Y (on IBM/VM, for IBM-3812).
PWD password (VM only)
This has to be used to specify the minidisk password of the disk
containing the metafile to be plotted. This password is necessary
only if the disk has a READ password.
A default password cannot be set.
- Syntax:
- GRPLOT fn ft fm ( PWD mypass (on IBM/VM).
SPOOL [n/CLOSE] (VM only)
The SPool option was introduced for those users who create and print
metafiles within FORTRAN programs (with VMCMS calls):
n is the Logical Unit number to which the FORTRAN program writes the
metafile and CLOSE is a keyword. The way this option works is the
following:
- The call "GRPLOT [fn ft] (SPOOL n "
must be issued either before the start of the FORTRAN program or
within the FORTRAN program with VMCMS
(e.g.: CALL VMCMS("EXEC GRPLOT (SPOOL n",IRC) ),
before beginning to write on Logical Unit n. Note that:
- fn ft are the filename and filetype of the metafile that is being
created. They can be omitted.
- "SPOOL n" should be the only option. Any other option will be
ignored.
- Once the metafile has been created, and is ready to be printed, the
FORTRAN program should make a VMCMS call to
"GRPLOT [fn ft] (SPOOL CLOSE PRINTER printer [other options]"
where:
- fn ft must be the same as in the previous call (and omitted if it
was omitted before).
- "CLOSE" is a keyword. The job will fail if this call was not
preceded by a call with the SPOOL keyword.
- "other options" are any printing options.
Note the following points:
- Since GRPLOT is defining a "FILEDEF n ...", the FORTRAN program
cannot have an "OPEN (UNIT=n ...)" otherwise the metafile will
not be spooled and GRPLOT will not be able to find it,
- The user must NOT modify the PUNCH settings between the two calls
"GRPLOT [fn ft] (SPOOL n" and "GRPLOT [fn ft] (SPOOL CLOSE PRINTER
printer [other options]",
- If the job fails between the two calls, the PUNCH will have the
GRPLOT settings and not the user's. In most cases this should
not cause problems since:
- the SPOOL option will be used mostly by batch jobs, therefore
the PUNCH will be that of the batch worker,
- the only command used to modify the PUNCH settings is
"CP SPOOL PUNCH TO user" where USER is the user who is running
GRPLOT, which means that something is actually changed only if
user USER is spooling his PUNCH to someone other than himself.
- "GRPLOT [ ] (SPOOL n" and "GRPLOT [ ] (SPOOL CLOSE [ ]"
must always be used together.
TIME time (VAX and APOLLO only)
The TIme qualifier followed by a value can be used to specify the
time in minutes for the VM Batch job. The default value (2 mn.)
is normally sufficient, except for very large metafiles.
- Syntax:
- GRPLOT/TIME=4 (on VAX/VMS),
- grplot -time 4 (on Apollo).
MSG / NOMSG (VAX only)
Option MSG is selected by default: use of this option means that the
qualifiers/options which are being sent to the VM batch job, and their
values, are displayed on the terminal. Option /NOMSG disables this
feature.
- Syntax:
- GRPLOT/NOMSG (on VAX/VMS. By default it is GRPLOT/MSG).
NOTIFY (APOLLO only)
Use of option NOTIFY (-n) on the Apollo means that the console log
from the VM batch job will be returned to the Apollo. This file can
then be fetched using the "xfetch" command. By default NO console
log is returned.
- Syntax:
- grplot -n (on Apollo).
GRPLOT Usage Notes
- The following metafile types are the only ones to be recognized as
valid by GRPLOT:
- GTS-GRAL
- PLOT10 GKS "Appendix E" metafile output (EMO)
- MGKS
PLOT10 metafiles created before 1987 are NOT valid and must be
converted (contact the Graphics Section for help).
-
A certain amount of parameter checking is done when DEFAULTS SET
is used on VM, but the user is warned that it is impossible to check
for all inconsistencies. A different set of defaults can be chosen
for each device. The printer/plotter name given in the last DEFAULTS
SET call will be the default device (see "preferred Printer/Plotter" in
DEFAULTS LIST). Defaults cannot be set for FILENAME, PWD and SPOOL.
-
If the metafile is on a temporary disk on VM it will be placed on
the user's PUNCH for processing by the batch job, therefore the user
cannot modify the PUNCH SPOOLIDs or delete PUNCH files until the
batch job submitted by GRPLOT is completed otherwise it will fail.
-
The following is about use of colours and only applies to
PRINTER A4COLOUR:
- The GKS colour indices and corresponding colours are
- 1 Black
- 2 Red orange
- 3 Green
- 4 Dark blue
- 5 Yellow
- 6 Magenta (red-purple)
- 7 Cyan (light blue)
- 8 White
A frequent disappointment is the yellow which stands out well on a
dark terminal screen but is very pale on white paper, particularly
for lines, markers and text.
-
For economic reasons we use 3-colour ink rolls but standard Versaplot
software expects black as the fourth colour. This affects the colours
available when using solid fill area and the new version now gives
black for colour index 1 and white for index 8, consistent with the
colour indices for the other primitives. Other shades are available
using interior style "PATTERN" and the pattern index from 1 to 256.
Again, the lack of black causes frequent duplication and the colour
table displayed at the plotter should be consulted. This feature is
very device specific and should not be used in applications that
must be very portable to different colour devices. HATCH colours are
limited to the 7 basic colours.
-
MAXIMUM DISPLAY SPACE: while the GRPLOT exec sets ORIENT P as
the default, GKS programmers should be aware that the underlying
software expects landscape with XMAX 0.24 and YMAX 0.20 metres if
they wish to tailor their output for this device.
For ORIENT P the XFACT and YFACT options are applied after rotation
so that for simple applications with no workstation transformation
setting YMAX to 1.2 will fill the page.
-
For the A0COLOUR plotter the colour table is the same as for
A4COLOUR above. However, as it has black also, all 256
colors are available using the "PATTERN" style.
GRVIEW, GRCONV and GRPLOT Distribution and Installation
GRVIEW, GRCONV and GRPLOT are Cern utilities and are available
from the CERN Program Library. However, for maintenance and
convenience reasons, they have been included in the GTSGRAL
distribution tape. Users who do not have the GTSGRAL license, but
who use an other GKS implementation (like DECGKS for instance),
and who would like to use or install these softwares, should contact
N. Cremel for details (n.cremel@cern.ch).
GRVIEW and GRCONV refer to the same FORTRAN/GKS code and the
commands both use the same executable module on all systems
(VAX/VMS, IBM/VM and Apollo). The program makes use of
all GTS-GRAL drivers available at Cern (some of these drivers,
like Postscript or Tektronix 4014 contain many CERN modifications).
GRPLOT makes use of a CERN-written interpreter and driver for
the Xerox and 3812 printers, and a GTSGRAL driver for the
Versacolor. At Cern, and for the moment, these drivers are only
available on CERNVM. On host systems other than CERNVM
the GRPLOT command remotely send a batch job to CERNVM.
System managers who would like to install a command
similar to GRPLOT on their own site should contact either
Ian Mclaren (Ian.McLaren@cern.ch) or Nicole Cremel
(n.cremel@cern.ch).
VAX
GRVIEW, GRCONV and GRPLOT are DCL commands. For each command
a CLD file (GRVIEW.CLD, GRCONV.CLD and GRPLOT.CLD) is available
(and must be installed in the system) as well as an executable
module (the same one for GRVIEW and GRCONV, called GRVIEW.EXE,
and GRPLOT.EXE for GRPLOT). On VXCERN these CLD files are in
the directory GKS_ROOT:[UTL], and they expect that the EXE modules
have been put in the directory GKS_ROOT:[EXE], where GKS_ROOT is
a logical name defined when installing GTSGRAL software at a
system level (when running the procedure GKSSTART.COM).
The VAX version of GRVIEW/GRCONV/GRPLOT can be distributed without
going through the Program Library if the target machine is connected
to DECNET, and the following automated procedure has been written
to carry out the installation:
VXCERN::DISK$CERN:[CERN.GKS.PRO.MGR]INSTALL_GR.COM
This procedure assumes that the GTSGRAL software installation
has been performed before, otherwise the procedure will fail
with an error message. It is necessary to answer various
questions during the installation (for instance the name of
the root directory on the target node in which GKS has been
installed and the version, OLD, PRO or NEW, to be copied).
To make DCL commands and HELP files installed at the system
level system priviledges are required to run the procedure.
Note that this procedure can be automatically invoked by the
general procedures to be used for the GTSGRAL software installation
(INSTALL_GKS.COM or INSTALL_GKS_GPX.COM). The user must
in that case answer "Y" to the question:
"Do you want to install CERN metafile utilities (GRVIEW/GRCONV/GRPLOT) ?"
In case of problems, or if you need more information, you
should contact N. Cremel (n.cremel@cern.ch).
IBM
GRVIEW, GRCONV and GRPLOT are VM EXECs written in REXX. For each
command a file with filetype EXEC is available, as well as a
PANEL (filetype PANEL). No specific automated procedure has
been written to perform the installation and users who would like
to have more information should contact either Ian Mclaren
(ian.mclaren@cern.ch) or Nicole Cremel (n.cremel@cern.ch).
Apollo
GRVIEW, GRCONV and GRPLOT are Shell Scripts written in C-Shell.
No specific automated procedure has been written to perform
the installation and users who would like to have more information
should contact Nicole Cremel n.cremel@cern.ch.