1 PLOTTING
 PLTLIB is a library of FORTRAN callable subroutines which can be used to
 generate a plot file.  Once generated, the plot file can be displayed on
 one or more graphic devices by issuing a command specific for the desired
 device.  Display devices currently supported include the LXY22 (printronix)
 printer/plotter (SPLOT command), the Hewlett Packard 7475A or 7470A pen
 plotters (HPPLOT command), the LNO3 PLUS laser printer (SLPLOT command) and
 terminals capable of using Tektronix 4010 emulation (including VT240
 terminals, TEKPLT command).  Programs using PLTLIB must contain certain
 subroutine references described under SYNTAX.      
 
 A FORTRAN program which includes CALLS to routines resident in PLTLIB must
 be linked to the library as follows:

 LINK MYPROG.OBJ,$DISK1:[PROG]PLTLIB.OBJ

 Running the program will then produce one or more plot files.  By default
 the plot files will be given a unique name of the form  PLTNNN.PLT where
 NNN is an integer.  The plot can then be viewed on any supported device.
  
2 SYNTAX
 
 Each plot must begin with a call to GRAPH (initial plot) or GRAPH2 ( for
 subsequent plots generated in the same job) and end with a call to ENDPAG.
 In between these two calls other application dependent subroutines may
 also be referenced.  The routines available in PLTLIB include METRIC,
 PLTNAM, GRAPH, GRAPH2, ORIGIN, PENUP, PENDN, PENSET, PLOT, WHERE, SYMBOL,
 PLTSYM, NUMBER, ENDPAG and QIKPLT.
3 METRIC
 
 METRIC indicates whether subsequent size and coordinate values will be
 given in inches or centimeters.  It can be called at any time during
 the plot generation to change the units.  METRIC and QIKPLT are the only
 routines which can be called prior to calling GRAPH.  If METRIC is not
 called, CENTIMETERS is the DEFAULT. 

 format: CALL METRIC(.TRUE.)
             
               or

         CALL METRIC(.FALSE.)

               or

         CALL METRIC(arg)  where "arg" is a logical variable name

         .TRUE.  selects centimeters
         .FALSE. selects inches

3 PLTNAM
 PLTNAM can be called to give the output plot file a specific name.  If
 not called, a unique name of the form PLTNNN.PLT will automatically be
 generated where NNN is a 3 digit number.  PLTNAM may be called any time
 between the calls to GRAPH and ENDPAG to successfully name the plot file. 
 
 format:  CALL PLTNAM(nchar,name)
 
                nchar = number of characters in the filename

                name  = string containing the filename.  Note that "name"
                        must be a variable or array of type CHARACTER or
                        be explicitly given in quotes.  It should NOT be
                        a variable or array of type INTEGER or REAL simply
                        read in with an "A4" format.

3 GRAPH
 GRAPH MUST be called to initialize the first plot created by a job.
 It is used to initialize plot parameters and to declare the maximum
 plot size.

 format: CALL GRAPH(xsize,ysize)

         xsize = maximum plot width in horizontal "x" direction
 
         ysize = maximum plot height in vertical "y" direction

                 xsize and ysize are assumed to be given in centimeters
                 unless a call to METRIC has changed the units.
                 
                 xsize must be less than or equal to 32.25 inches
                 ysize must be less than or equal to 32.25 inches


3 GRAPH2
 GRAPH2 is used when multiple plots are created by one job.  It
 initializes plot parameters for plots other than the first.  Each plot
 after the first begins with a call to GRAPH2.  The maximum plot size is
 taken to be the same as in the original call to GRAPH.

 format: CALL GRAPH2

3 ORIGIN
 ORIGIN is used to relocate the plot origin from its default position
 (lower left corner of rectangle defined by call to GRAPH).  Since all
 arguments to PLOT routines are specified as distances from the origin
 point (0,0), relocating the origin can simplify plotting of negative
 numbers or stereo images.
 
 format: CALL ORIGIN(xorgin,yorgin)

                  
         xorgin =
                  Coordinates of new origin point relative to the lower
                  left corner of rectangle defined by the call to graph.
         yorgin =  
                  
3 PENUP
 PENUP causes the pen to be raised from the paper without changing its 
 location.

 format: CALL PENUP

3 PENDN
 PENDN causes the pen to be lowered to the paper without changing its
 location.

 format: CALL PENDN

3 PENSET
 PENSET is used to change pens to different colors, thicknesses or
 line types.  Currently one can choose between 4 pens.  Note however,
 that only the Hewlett Packard plotters and the LNO3 PLUS laser printer
 are capable of actually using different pens.  One can still display a
 multipen plot on the other graphic devices, but only one "pen" will be
 used.  If not called, a default pen will be selected.
 
 format: CALL PENSET(n)
 
         n = Pen number in range 0-3

             For the Hewlett Packard plotters the relationship between
             pen number and pen type depends on how the pens are placed
             in the plotter carrousel, and only one line type (solid)
             is available.  For the laser printer 

             0 = solid line, normal intensity
             1 = solid line, bold intensity
             2 = dotted line, normal intensity
             3 = dashed line, normal intensity
 
               
3 PLOT
 PLOT is used to move the pen in a straight line from its current position
 to a new position.  It is used to locate the pen at the starting point
 of a new line and also to draw the line.  All plotting is done by the 
 PLOT routine, either by direct calls to PLOT or by calling other routines
 which themselves call PLOT.

 format: CALL PLOT(xpage,ypage,ipen)
 
         xpage = 
                  x and y coordinates of position to which pen is moved.    
         ypage = 
      
         ipen  =  3  pen is raised before move
               =  2  pen is lowered before move
               = 0,1 pen status is unchanged before move


3 WHERE
 WHERE can be used to determine the current position of the pen in order
 to minimize pen movement.  The coordinates returned will be in units
 specified by the METRIC routine, or in centimeters if METRIC was not
 called. They are relative to the current origin point, which may differ
 from (0,0) if ORIGIN was called.

 format: CALL WHERE(xpage,ypage,f)

         xpage = 
                 REAL variables which receive the current pen coordinates.
         ypage = 

             f = dummy REAL variable which will be returned with the value 
                 1.0 (leftover from earlier version of PLTLIB)  

3 SYMBOL
 SYMBOL can be called to draw ASCII character strings on a plot.  It is
 usually called to add titles or to center a character on a point.


 format: CALL SYMBOL(xpage,ypage,height,string,angle,nchar)

         xpage =
                 Coordinates of lower left corner of first character.
         ypage = 

         height = Character height.  Note that width is same as height.

         string = ASCII string containing characters to be drawn.  It must
                  be a variable or array of type CHARACTER, or be given
                  in quotes.  It should NOT be a variable or array of type
                  INTEGER or REAL simply read in with an "A4" format.

         angle = Angle at which the character string is plotted, specified
                 in degrees from the x axis.  angle = 0.0 plots characters
                 right side up and parallel to the x axis.  angle = 90.0
                 plots characters parallel to the y axis.

         nchar = Number of characters to plot.  Note that if nchar=-1, 
                 only one character will be plotted, but it will be
                 centered on xpage,ypage rather than to the right. 

         Note that if xpage, ypage or both have the value 999., then the
         call is considered a continuation of a previous call.  Plotting
         will resume from the old x, old y or both coordinates depending
         on which values are 999.  This can be used to generate subscripts
         or superscripts on a plot.
3 PLTSYM
 PLTSYM can be called to draw ASCII character strings on a plot.  It is
 similar to SYMBOL and is usually called to add titles or to center a
 character on a point.  Unlike SYMBOL however, it does not plot any lines.
 It simply generates the appropriate parameters for the PLOT routine, and
 passes them to a user supplied routine.  The user supplied routine can
 then modify the coordinates and call PLOT with the new values.  This is
 primarily used to label 3-dimensional objects in which case the user
 supplied routine would map coordinates in a 3-D coordinate system to the
 corresponding 2-D plotter system.  The user supplied routine must accept
 the 3 parameters X,Y and IPEN.  It can modify the coordinates as desired
 and then call PLOT with the new values and IPEN as arguments.   


 format: CALL PLTSYM(xpage,ypage,height,string,angle,nchar,sname)

         xpage =
                 Coordinates of lower left corner of first character.
         ypage = 

         height = Character height.  Note that width is same as height.

         string = ASCII string containing characters to be drawn.  It must
                  be a variable or array of type CHARACTER, or be given
                  in quotes.  It should NOT be a variable or array of type
                  INTEGER or REAL simply read in with an "A4" format.

         angle = Angle at which the character string is plotted, specified
                 in degrees from the x axis.  angle = 0.0 plots characters
                 right side up and parallel to the x axis.  angle = 90.0
                 plots characters parallel to the y axis.

         nchar = Number of characters to plot.  Note that if nchar=-1, 
                 only one character will be plotted, but it will be
                 centered on xpage,ypage rather than to the right. 

         sname = name of the user supplied subroutine.  Note that if the
                 routine does not modify the coordinates and simply 
                 passes them to PLOT, then calling PLTSYM is identical to
                 calling SYMBOL.

         Note that if xpage, ypage or both have the value 999., then the
         call is considered a continuation of a previous call.  Plotting
         will resume from the old x, old y or both coordinates depending
         on which values are 999.  This can be used to generate subscripts
         or superscripts on a plot.

3 NUMBER
 NUMBER is used to plot a floating point number in a FORTRAN F-type format

 format: CALL NUMBER(xpage,ypage,height,fpn,angle,ndec)

         xpage =
                 Coordinates of lower left corner of first digit drawn.
         ypage =

         height = Digit height. Note that width is same as height.

         fpn    = REAL variable containing number to be drawn.

         angle = Angle at which the number is plotted, given in degrees
                 from the x axis.  angle = 0.0 plots number right side up
                 and parallel to the x axis.  angle = 90.0 plots number 
                 parallel to the y axis.

         ndec = Number of digits to be plotted. ndec > 0 specifies number
                of digits to right of decimal point.  ndec = 0 plots only
                the integer part of number followed by a decimal point.
                ndec = -1 plots integer part of number without decimal
                point. 
                 
3 ENDPAG
 ENDPAG terminates the plot and closes the output file.  It MUST be called
 to end each plot.
 
 format: CALL ENDPAG
 
3 QIKPLT
 QIKPLT is a routine which can be used to generate a simple y vs x plot.
 The plot is always 9 inches by 6.5 inches and can accomodate any number
 of coordinate pairs.  If QIKPLT is to be used, then calls to GRAPH,
 ENDPAG and all other library routines should be omitted as they are
 automatically generated.
 
 format: CALL QIKPLT(x,y,npts,titlex,titley)

         x =     array containing X (horizontal) values of points (X,Y)

         y =     array containing Y ( vertical ) values of points (X,Y)

         npts =   number of points in x and y arrays

         titlex = ASCII string containing title for x axis

         titley = ASCII string containing title for y axis

         NOTE! titlex and titley should be variables or arrays of type
               CHARACTER or be given explicitly in quotes.  They should
               NOT be arrays or variables of type REAL or INTEGER simply 
               read in with "A4" formats.
  
3 EXAMPLE
 The following FORTRAN program, when linked to PLTLIB and run, will
 generate a plot file which draws a 5 x 7 inch rectangle with the
 message "THIS IS A TEST" within it.

       CHARACTER*14 STRNG
 C--- INITIALIZE TEXT
       STRNG='THIS IS A TEST'
 C--- SET UNITS TO INCHES
       CALL METRIC(.FALSE.)
 C--- REQUEST 9 X 7 INCH SPACE 
       CALL GRAPH(9.,7.)
 C--- SHIFT ORIGIN TO LEAVE A ONE INCH BORDER
       CALL ORIGIN(1.,1.)
 C--- PLOT THE 5 X 7 INCH RECTANGLE
       CALL PLOT(0.,0.,3)
       CALL PLOT(7.,0.,2)
       CALL PLOT(7.,5.,2)
       CALL PLOT(0.,5.,2)
       CALL PLOT(0.,0.,2)
 C--- PLOT THE TEXT STRING
       CALL SYMBOL(0.875,2.3125,.375,STRNG,0.0,14)
 C--- END THE PLOT
       CALL ENDPAG
       STOP
       END

2 SPLOT
 SPLOT is a command which can be used to submit one or more files for
 plotting on the LXY22 printer/plotter.  It is a preferred method of
 obtaining hard copies of plots, since it quickly frees the users
 terminal for other work.  It submits a batch job to rasterize the plot
 images and queues the output to the LXY22.  Currently SPLOT and SLPLOT
 are the only means of producing multiple plots unattended.
 
 format: SPLOT [file-spec] [file-spec] [file-spec] etc.
 
         file-spec = file to be plotted.  Up to eight file-specs
                     can be supplied, and each may contain wild card
                     designations.  If multiple file-specs are given
                     they must be separated by spaces, not commas.
                     The default file-spec is  *.PLT 
                     
2 SLPLOT
 SLPLOT is a command which can be used to submit one or more files for
 plotting on the LNO3 PLUS laser printer.  It is a preferred method of
 obtaining hard copies of plots, since it quickly frees the users
 terminal for other work.  It submits a batch job to translate the plot
 images and queues the output to the LNO3 PLUS.  Currently SLPLOT and
 SPLOT are the only means of producing multiple plots unattended.
 
 format: SLPLOT [file-spec] [file-spec] [file-spec] etc.
 
         file-spec = file to be plotted.  Up to eight file-specs
                     can be supplied, and each may contain wild card
                     designations.  If multiple file-specs are given
                     they must be separated by spaces, not commas.
                     The default file-spec is  *.PLT 
                     

2 HPPLOT
 HPPLOT is a command which can be used to generate a plot on either the
 Hewlett Packard 7470A or 7475A pen plotter.  

 format: HPPLOT

         The user will then be prompted to enter the name of the plot
         file to be displayed.  The default is to plot on the 7475A
         model (6 pen version) with 8.5 x 11 inch paper.  Other options
         may be selected by appending the appropriate qualifier to the
         plot filename. The plot will automatically be scaled and centered
         for the device and paper size.

3 /L
 Appending /L to the filename will generate the plot on large (11 x 17)
 inch paper.  This is meaningful only for the 7475A model plotter, and
 may be used in addition to /T.

3 /T 
 Appending /T to the filename will slow down the pen motion.  It is
 used for plotting on transparencies or for plotting with a pen that
 is nearly dry.  It may be used in addition to /L.

3 /2
 Appending /2 to the filename will enable plotting on the smaller 7470A
 (2 pen) plotter.  This uses only 8.5 x 11 inch paper and should not be
 included with the /L option.  It may be used in addition to /T.

2 TEKPLT
 TEKPLT is a command which can be used to display a plot on a terminal
 capable of TEKTRONIX 4010 emulation.  By default, it assumes a VT240
 series terminal is to be used and sends escape sequences to place the
 terminal in 4010 emulation mode before the plot and to return to native
 mode afterwards.  Other (non-Tektronix) terminals should be placed in
 4010 emulation mode prior to running TEKPLT.  For use with non-VT240
 terminals see the /NOEM option.

 format: TEKPLT
 
         The user will then be prompted to enter the name of the plot
         file to be displayed.  The plot will be displayed in the 
         orientation selected by the user at plot creation time.  When
         the plot is finished the terminal bell will ring, and nothing
         will happen until the user presses the return key.  This gives
         the user time to view the plot and/or make a hard copy before
         completion messages are written to the screen.
       
   
3 /R
 Appending /R to the filename will cause the plot to be rotated by 90
 degrees, which sometimes gives a better figure if the original plot
 is rectangular and oriented in contradiction to the screen dimensions.
 It may be used in addition to /NOEM.

3 /NOEM
 Appending /NOEM to the filename suppresses the sending of escape codes
 to place VT240 series terminals in and out of TEKTRONIX 4010 emulation
 mode.  It should be used for plotting on native TEKTRONIX terminals or
 other terminals explicitly placed in 4010 mode prior to running TEKPLT.
 It may be used in addition to /R.