1 Concepts
This program enables the user to plot data on a variety of graphic devices
with many user-selectable options.   Data may be entered from the keyboard
or from one or more files. 

For bivariate plots, there are up to 8 curves  permitted on a single plot.
Data is  associated  with a curve by use of the  CURVE command.   All sub-
sequently  entered  data which is  normally  associated  with  curves will
automatically be  associated with the  specified curve until another curve
command is encountered. 

For a single plot, the CLEAR command will return the program to its initial
state, deleting all data and resetting all pointers and default values. For 
subplots,  the  CLEAR  command will reset the data for the present  subplot 
only.
                                                               
Any data may be  changed by simply re-entering that data from the keyboard
or a file.   In addition,  access to the system  editor is provided by the
EDIT command for more extensive  modifications.   The EDIT command is also
the only way to delete data. 
1 Commands
The user  interface to the GRAF  program is  command-oriented and uses the
MERLIB language manipulation routines to provide a flexible, user-friendly
environment. All commands can be abbreviated to their minimum, nonambiguous
form.  Commands may be entered in any order within the constraints implied
by the  CURVE  command (see HELP CURVE). If a command which would normally
be used to specify an option for a curve  (such as symbol type) is entered
before any curve has been selected, CURVE 1 will be assumed. 

If any  command can not be completely  entered on a single  line of input,
the  command  may be  continued  on the next line by  entering an  elipsis 
(...) as the last entry on the first line. This technique may be continued 
to a maximum length of 4000  characters  (not including trailing spaces or 
elipses).  Please note that only the first 132 characters per line will be 
read although any attempt to read more than 132  characters will  normally 
result in an error message. 

In those commands where options are entered  (such as FONT);  the keywords 
for the option  choices may be  abbreviated to the minimum,  non-ambiguous 
subset.
1 APPEND
Alias MERGE.

The APPEND command reads a file of data and appends the data in the file to
any existing data. (Unlike READ which erases any existing data.) Values for
plot-wide data  (such as plot title)  from the appended file will supercede
existing values.  Curve numbers from the appended file will be increased by
the number of already existing curves. 

      APPEND filespec
1 BATQMS

The BATQMS command creates the QMS laser printer file using the current plot 
data by submitting a job to the batch  queue. Control is returned to the 
program.  The .QMS file will take the default filename and a message 
will be sent when the job has completed.   A print command may be entered
on the BATQMS command line to send the completed .QMS file either the 
QMS 800 laser printer (LPRINT) or the QMS 1500 laser printer (QPRINT).
(The VPRINT command is NOT supported at this time).

      BATQMS [laser_print_command]
1 BCOLOR

The BCOLOR command chooses the background color for the Tektronix 4115
and 4125 terminals. The default background color is black. The choices
for BCOLOR are:

      BLACK, WHITE, MAGENTA, RED, YELLOW, GREEN, CYAN, BLUE

      BCOLOR choice
1 BORDER

The BORDER command turns on or off the border around the screen. 

      BORDER boolean_option
2 Boolean_option

 Boolean options are normally stated as ON or OFF, but may also be stated as
 1 or 0 (respectively).  The default for BORDER is OFF. 
1 CLEAR
Alias RESET.

The CLEAR command deletes all data and resets defaults to their initial
values.  For subplots, the CLEAR command will work only for the present
subplot - it will not reset the number of subplots to 1.

      CLEAR
1 COLOR

 The COLOR command sets the color to be used for all portions of the plot
 that are subsequently defined until another color command is encountered.
 The COLOR command is valid for the Tektronix 4115 terminals, the Tektronix
 4662 plotter, and the HP plotter; it is ignored for all other devices.  
 The choices for COLOR are:

 BLACK, WHITE, MAGENTA, RED, YELLOW, GREEN, CYAN, BLUE

 The default is WHITE for CRTs and BLACK for hardcopy devices.


      COLOR choice
1 CURVE

 The CURVE command sets the curve number for any data which is entered until
 the next curve  command is entered. The curve  number must be between 0 and
 8.  If no  CURVE  command  has been  entered by the time the first  data is 
 read, 1 will be assumed. If 0 is chosen, subsequent  commands will apply to
 ALL  curves (except the  X and Y  commands, which  will  increase the curve
 number to the next available value).

      CURVE number
1 DATE

The DATE command appends the date on which the program was run to the lower,
left-hand  corner of the plot.  A date may be  entered on the line with the
date command; if no date is entered, the present date is used. 

      DATE boolean_option
            or
      DATE date
2 Boolean_option

Boolean options are normally stated as ON or OFF, but may also be stated 
as 1 or 0 (respectively).  The default for DATE is OFF.
1 DCOLOR

The DCOLOR command chooses the default color for the plot labels and axes.
The choices for DCOLOR are:

 BLACK, WHITE, MAGENTA, RED, YELLOW, GREEN, CYAN, BLUE

The default is WHITE for CRTs and BLACK for hardcopy devices.

      DCOLOR choice
1 DEVICE

The DEVICE command chooses the graphical output device.  It is possible to
change the device type  during a session  (as would be done to send a plot
to a plotter) or through data entered by a READ command.  Present choices:

TEK4014, TEK4115, HP7580, TEK4662, GRAPHON, GP29, DIP, QMS, VERSATEC, PC


      DEVICE devtype  [filespec]
2 DIP

The choice of DIP as the device will produce a file named 'GRAF.DIP' con-
taining the device-independent commands usable by a variety of standalone
device  interfaces. If the optional  parameter,  filespec, is included on
the line, the file will be named 'filespec.DIP' instead of 'GRAF.DIP'. See
HELP DIPQMS, DISSPLA, and LPRINT in the VMS help command for more details. 
2 QMS

The choice of QMS as a device type will produce a file  containing the
commands to produce  graphics on the laser  printer.  If 'filespec' is
included on the line, the file will be called 'filespec.QMS', otherwise
it will be called  'GRAF.QMS'.  This file is sent to the laser printer
with the LPRINT or QPRINT command.
2 VERSATEC

Choosing  device  VERSATEC will produce a file containing the commands to
create  graphics on the Versatec  color printer.  If  'filespec' is also
specified on the DEVICE command line, the file will be called 'filespec.PLT'.
Otherwise the file will be called  'GRAF.PLT'.  This file may then be sent
to the Versatec by using the VPRINT command.
2 FILESPEC 

The 'filespec' option specifies the name for the output file when the DIP,
QMS, or  VERSATEC option is chosen for DEVICE.  If it is omitted, the name
GRAF.DIP, GRAF.QMS, or GRAF.PLT will be assigned to the output file.  This
option is only valid with DIP, QMS or VERSATEC. 
1 DISPLAY

The  DISPLAY command will display the values for variables in the common
blocks PDATA and SDATA. These common blocks include all variables avail-
able to the HARDBALL command.  The command "DISPLAY ALL" or  "DISPLAY *" 
will list the names and values of all HARDBALL variables.

      DISPLAY variable [,variable...]
1 DFONT

 DFONT is now a synonym for FONT.   See FONT.
1 EDIT
Alias EDT, ADAM.

The EDIT command invokes the VMS system editor to change the existing data
or an external file.   Changes can be made to existing data by re-entering
the relevant command from the keyboard,  but the editor makes this process
easier and is the only method of deleting data.   If the 'filespec' option
of the edit command is omitted  (see below)  the present data will be mod-
ified.   If it is included,  that file will be edited and the present data
will remain unchanged.  WARNING, if you use the  WRITE 'filespec'   option
while you are editing the present data,  the changes will be saved in that
file, but no changes will be made to the present data. 

      EDIT [filespec]
1 FIGURE

The FIGURE command specifies the text or number to be attached at the bot-
tom of the plot.   Note that the word 'figure' is not automatically added 
to the text entered,  so that a command like   FIGURE FIGURE 1   would be 
required to get that type of label.

      FIGURE text
1 FIT

The FIT command is used to specify the type of curve fit (if any) which 
will be used when plotting the curve.  Choices are :

LINE, SPLINE, SMOOTH, PARA3


      FIT fit_type
2 LINE
This option connects each data point with a straight line segment.
2 SPLINE
This option chooses a natural, piecewise cubic spline.
2 SMOOTH
This option chooses a least-squares, cubic spline smoother.
2 PARA3
This option chooses a 3rd order parametric polynomial (used for unevenly
spaced data).
1 FONT

The FONT command chooses the character font to be used for the text in
labels.  See the  DISSPLA User's Guide for a sample of each font type.
The choices are :

CARTOG, SIMPLEX, SCMPLEX, COMPLEX, DUPLEX, TRIPLEX, SERIF,
LOGO1, FASHON, SWISSLIGHT, SWISSMEDIUM, SWISSBOLD

      FONT font_type

The default font is DUPLEX.
1 FRAME

The FRAME command turns on or off the frame around the data area of the
plot.

      FRAME boolean_option
2 Boolean_option

 Boolean options are normally stated as ON or OFF, but may also be stated as
 1 or 0 (respectively).  The default for FRAME is OFF.
1 GENERATE

The GENERATE command chooses the type of plot to be generated.  At present,
the choices for plot_type are :   BAR,  BIVARIANT,  CONTOUR,  SURFACE, and
VECTOR.  The default is BIVARIANT.

      GENERATE plot_type
1 GO
Alias PLOT.

The GO command produces the plot after all data has been entered.

     GO
1 GRID

The GRID command turns on or off the grid lines.

      GRID Boolean_option
2 Boolean_option
      
 Boolean options are normally stated as ON or OFF, but may also be stated as
 1 or 0 (respectively).  The default for GRID is OFF.
1 HARDBALL

The  HARDBALL command enters a special input mode for explicitly  modifying
variable values which are not otherwise supported by commands.  This option
is described in detail in the user's manual.  The command 'HARDBALL ?'
will list all variables available to HARDBALL.

      HARDBALL variable=value[,variable=value...] &END
1 HELP

To receive help enter the individual  command name, or  'COMMANDS'  to see
general information on command syntax, or 'CONCEPTS'  to see a  discussion
of the design philosophy of this program.  Help on a specific topic may be 
requested from within the program by including the topic on the help line.

      HELP [GRAF_command]
1 LABEL

The  LABEL  command  specifies  the text to be  used as the entry for the 
present curve in the legend.  If the LEGEND command has not been selected, 
the LABEL command will automatically select LEGEND ON.

      LABEL text
1 LEGEND

The LEGEND command turns on or off the legend. For  BIVARIANT plots, a text
string may be entered on the LEGEND line to specify the title of the LEGEND
box (20  characters maximum).  The text of the labels for each curve can be
defined by the  LABEL command.  Although the  LABEL and  LOCATION  commands
automatically turn on the LEGEND option, the LEGEND option can be explicitly
disabled by entering  LEGEND OFF  after all of the label commands have been
read.  See also LABEL and LOCATION. 

      LEGEND boolean_option
               or
      LEGEND text
2 Boolean_option

 Boolean options are normally stated as ON or OFF, but may also be stated as
 1 or 0 (respectively).  The default for LEGEND is OFF.
1 LINE

The LINE command  specifies the line type to be used for the present curve.
The default line type is solid.  The options are specified as a number from 
zero to six representing:

No Line, Solid, Dotted, Dashed, Chain Dotted, Chain Dashed, and Dot Dashed


      LINE number
1 LIST
Alias TYPE.

The LIST command displays the present data (including defaults) on the 
terminal.

      LIST
1 LOCATION

The  LOCATION  command specifies the X,Y location of the lower, left-hand 
corner of the  legend in inches  from the lower, left-hand  corner of the 
plot.  If the  LEGEND  option has not been chosen, the  LOCATION  command 
will automatically  select it. The default  location is the upper, right-
hand corner of the plot.  If  y_location is not  specified, the  previous 
value will be used.  If  x_location  is specified  as a double  quote ("), 
the previous value will be used. A negative  x_location will automatically
place the legend in the upper, right-hand corner. If either the x_location 
or y_location is preceded by a '+' or '-', the location is relative to the
previously displayed location.

      LOCATION x_location y_location
1 MACRO

The MACRO command defines the name and code for a user-defined command.
Lines of commands are entered until an  MEND  statement is encountered.
Parameters may be specified as "$1" through "$9".  The macro is invoked
by typing the macro name and actual  parameters (if any).  Macro  names
must not be an  abbreviation for a system command  (i.e.,  XM  is not a
valid macro name as it conflicts with  XMIN  and XMAX).


      MACRO macro_name [description]
      line 1 of macro code
      line 2 of macro code
      MEND
      .                   
      .
      macro_name [actual_param_1 actual_param_2 ...]

Note: System-wide macros are kept in the file MERLIN:MACROS.GRF.
1 PAGELABEL

The PAGELABEL command specifies the text to appear at the bottom the page
for a single plot or page of subplots.

      PAGELABEL text
1 PHI
The PHI command is used to input the direction angles for the vectors in
a vector plot. The data is assumed to be a martix of PHI values  corres-
ponding to each  X-Y  point. The data is to be entered by rows, each row
corresponding to all  Y values for a single X value. The input is of the
form 'PHI(n)=' followed by the list of PHI values separated by commas or
spaces. 'n' is the row number corresponding to the current X position and
must be an integer. The number of values in each row must be the same as
the number of values previously entered using the Y command.  The number
of rows  entered  must be the same as the  number of  values  previously 
entered using the X command. The PHI values must be in radians.

      PHI(n) = PHIvalue1, PHIvalue2..., PHIvalueM

   (ie:  PHI(N)= PHI(N,1), PHI(N,2), ... PHI(N,M) )

1 QUIT
Alias EXIT.

Exit the program.  The present data will not automatically be saved (see 
WRITE).
  
      QUIT
1 READ
Alias EXECUTE, RUN, and INPUT.

The READ command reads a data file containing  commands and/or data in the 
same format as is required for entry from the keyboard.  A file being READ 
may  contain  additional  READ  commands.  Any  commands in the  READ file 
(including GO) will be executed as they are encountered. Upon reaching the 
end of the READ  file, control will be returned to the  keyboard or to the 
file which issued the READ command. If an end of file is READ from the top 
level or keyboard, it will be treated as an EXIT command; this enables the 
program to be run in batch mode.

      READ filespec
1 SHADE

The SHADE command turns on or off the shading for shaded fonts (i.e., SWISS
LIGHT, SWISS MEDIUM, SWISS BOLD, SERIF, FUTURA, LOGO1, FASHON). 

      SHADE boolean_option
2 Boolean_option

 Boolean options are normally stated as ON or OFF, but may also be stated as
 1 or 0 (respectively).  The default for SHADE is ON.
1 STACK

The STACK command chooses between stacked bars and side-by-side bars on a
bar chart.

      STACK boolean_option
2 Boolean_option

 Boolean options are normally stated as ON or OFF, but may also be stated as
 1 or 0 (respectively).  The default for STACK is OFF.
1 SUBPLOT

The  SUBPLOT  command specifies that the present data will be  considered
to be one of one or more plots to appear on this page (screen).  There are 
three  layouts used by  GRAF:   a single  subplot, two subplots  arranged 
vertically, and three or four subplots in the corners. See the GRAF manual 
for samples.

      SUBPLOT subplot_number
1 SUBTITLE

The SUBTITLE command specifies the text to be plotted  below the title line 
on the plot.  The text of the  subtitle is  .65 times as high as the title.
A plot may include up to 3 subtitles. Subsequent subtitles (after the first)
must be preceded by a '+'.
    
      SUBTITLE [+]text
1 SYMBOLS

The SYMBOLS command defines the symbol type (if any) that are to be plotted 
over the actual data  points.  If the value for symbol_type, below, is zero 
then the line will be plotted without symbols.  By default, the symbol type 
is the same as the curve number.  If the value of symbol_type is  negative,
symbols will be produced but no connecting line.  Otherwise,  both the line
and symbol are  produced.  The (absolute) values for symbol_type are from 1
to 12 representing : 

  Square, Circle, Up triangle, Down Triangle, Diamond, Filled Square, 
  Filled Circle, Filled Up Triangle, Filled Down Triangle,  Filled 
  Diamond, Plus sign, X

      SYMBOLS symbol_type
1 TEXT

The TEXT command allows the addition of arbitrary text strings to the plot.
Up to 8 strings (one for each curve) may be added to a plot.  The  strings 
may be up to 80 characters long.

      TEXT X Y text_string
1 TICS

The TICS command turns on or off the tic mark option.  An integer value for
the number of tic marks may be entered on the TICS line.  This value is the
the number of tics per major division on all plot axes and must be between
0 and 20.

      TICS boolean_option
             or
      TICS integer_value
2 Boolean_option

 Boolean options are normally stated as  ON or OFF, but may also be stated as
 1 or 0 (respectively). The default for TICS is ON (1 tic per major division).
1 TIME

The  TIME command turns on or off the time stamp option.  If chosen, this 
option places the current time and date on the lower, left-hand corner of 
the plot. 

      TIME boolean_option
2 Boolean_option

 Boolean options are normally stated as ON or OFF, but may also be stated as
 1 or 0 (respectively).  The default for TIME is OFF.
1 TITLE

The TITLE command specifies the text to be plotted as the title line on the 
plot.  

      TITLE text
1 VMS
Alias DCL.

The VMS command passes a command to DCL for execution without exiting the 
program.  Any command which does not access  files open by the program is 
acceptable (eg, VMS DIRECTORY *.GRF).

      VMS command line
1 WRITE
Alias OUTPUT.

The WRITE command writes all of the present data to an external file in a 
format which can later be read into the program.  The  WRITE command does 
not affect the data in memory.  If 'filespec' is not entered, the default
file specification will be used.

      WRITE [filespec]
1 X

The  X  command defines the abcissa values for the curve.  The data is 
assumed to be an array of at least 2 and not more than 500 values. The 
form of the input is 'X=' followed by the list of values  separated by 
commas or spaces.

      X = value1, value2, value3..., valueN
1 XLABEL

The XLABEL command specifies the text to be produced below the x axis.

      XLABEL text
1 XLOG

The XLOG command causes the X axis to be logarithmic.  The number of 
decades are determined by XMIN and XMAX.

      XLOG boolean_option
1 XMAX

The  XMAX  command can be used to override the maximum  X  value which is 
calculated  when the data is read.  Because the value is  calculated when
the data is read, the XMAX command will be ignored if it is less than the 
calculated value and appears before all of the data in the input stream.

      XMAX value
1 XMIN

The  XMIN  command can be used to override the minimum  X  value which is 
calculated  when the data is read.  Because the value is  calculated when 
the data is read, the  XMIN command will be ignored if it is greater than 
the calculated value and appears before all of the data in the input stream.

      XMIN value
1 Y

The Y command defines the ordinate  values for the curve.  The data is 
assumed to be an array of at least 2 and not more than 500 values.  The 
form of the input is 'Y=' followed by the list of values  separated by 
commas or spaces.

      Y = value1, value2, value3..., valueN
1 YLABEL

The YLABEL command specifies the text to be produced below the Y axis.

      YLABEL text
1 YLOG

The YLOG command causes the Y axis to be logarithmic.  The number of 
decades are determined by YMIN and YMAX.

      YLOG boolean_option
1 YMAX

The  YMAX  command can be used to override the maximum  Y value which is 
calculated  when the data is read.  Because the value is calculated when 
the data is read, the YMAX command will be ignored if it is less than the 
calculated  value and appears before all of the data in the input stream.

      YMAX value
1 YMIN

The  YMIN  command can be used to override the  minimum  Y  value which is 
calculated when the data is read.  Because the value is calculated when the
data is read, the  YMIN  command will be ignored if it is greater than the 
calculated value and appears before all of the data in the input stream.

      YMIN value
1 Z
                   
The Z command is used to input the third  dimension  data for a contour or
surface plot. It is also used to input the magnitudes(lengths) of the vec-
tors for a vector  plot. The data is assumed to be a  matrix of  Z  values 
corresponding to each  X-Y  point. The data is to be entered by rows, each 
row corresponding to all Y values for a single X value. The input is of the 
form 'Z(n)=' followed by the list of Z values separated by commas or spaces. 
'n' is the row number corresponding to the current X position and must be an
integer. The number of values in each row must be the same as the number of
values  previously entered using the Y command. The number of rows entered
must be the same as the number of values  previously  entered using the X 
command.

      Z(n)= Zvalue1, Zvalue2...., ZvalueM

   (ie:  Z(N)= Z(N,1), Z(N,2), ... Z(N,M) )
1 ZLABEL

The ZLABEL command specifies the text to be produced below the Z axis.

      ZLABEL text
1 ZMAX

The  ZMAX  command can be used to override the maximum  Z value which is 
calculated when the data is read.  Because the value is calculated  when 
the data is read, the ZMAX command will be ignored if it is less than the 
calculated value and appears before all of the data in the input stream.

      ZMAX value
1 ZMIN

The  ZMIN  command can be used to override the minimum Z value which is 
calculated when the data is read.  Because the value is calculated when 
the data is read, the ZMIN command will be ignored if it is greater than 
the calculated value and appears before all of the data in the input stream.

      ZMIN value
