
     lineplot.doc                                           update 10/29/90
                                    LINEPLOT

     I. Function- LINEPLOT creates low-resolution graphs from cartesian 
     coordinates by printing characters on a lineprinter.  The program prints 
     only those data points that fall within a "window" whose limits are 
     determined by the limits of the horizontal and vertical scales.  Scale 
     coordinates and axes may be specified. 

     II. Program Flow
     Program output and user responses are listed as they would actually 
     appear on the screen.  Comments, which are listed here for explanatory 
     purposes but would not appear, are enclosed in the symbols (* *). 

     LINEPLOT       Version  7/ 7/90
     Enter input data filename:
     B:PI206.DAT                                   (* IBM-PC DOS protocol*)
     Enter output filename:
     PRN                                           (* IBM-PC DOS protocol *)
     Initializing...

     (* LINEPLOT reads in titles and initial values for parameters. *)
     (* Parameters are displayed which may be changed by the user.  *)

     Parameter   Description/Response                 Value
     ------------------------------------------------------
     1)ABCISSA  width (in characters) of graph              40
     2)ORDINATE height (in characters) of graph             50
     3)MINHSCAL minimum horizontal scale coordinate  0.000E+00
     4)MAXHSCAL maximum horizontal scale coordinate  5.000E+01
     5)MINVSCAL minimum vertical   scale coordinate  0.000E+00
     6)MAXVSCAL maximum vertical   scale coordinate  1.000E-03
     7)HAX      Y-coordinate of horizontal axis           0.00
     8)VAX      X-coordinate of vertical   axis           0.00
     9)SCALES   Print scales               (Y/N)             Y
    10)AXES     Print axes                 (Y/N)             Y

     Type number of parameter you wish to change
         (0 to continue)
     0

     (*LINEPLOT reads in datapoints from the input file and calculates the
     position for each in the graph. When finished, it prints the graph.   
     The following datafile would produce the graph shown below: *)

     Time (Hrs), Treatment: H=H2O  P=pathogen
     CPM bound by pI206 / total CPM
     0 50  0 0.001  0 0
     C        8 H
      2.0 1.43292E-04  4.0 2.76547E-04  6.0 2.36098E-04  8.0 2.68892E-04  
     12.0 1.66126E-04 18.0 2.03673E-04 24.0 2.20803E-04 48.0 3.63264E-04 
     C        8 P
      2.0 1.90517E-04  4.0 4.38811E-04  6.0 9.51132E-04  8.0 6.78946E-04  
     12.0 6.78363E-04 18.0 5.19984E-04 24.0 6.40483E-04 48.0 3.58734E-04 
     



     C 1.000E-03|
     P          |
     M          |     P
                |     .
     b 9.000E-04|     .
     o          |     ..
     u          |     ..
     n          |     ..
     d 8.000E-04|    . .
                |    . .
     b          |    . .
     y          |    .  .
       7.000E-04|    .  .
     p          |    .  P...P
     I          |    .       .          P.
     2          |    .        .        .  ..
     0 6.000E-04|    .         .      .     ..
     6          |    .          .   .         ..
                |   .            . .            ..
     /          |   .             P               ..
       5.000E-04|   .                               ..
     t          |   .                                 ..
     o          |   P                                   ..
     t          |   .                                     ..
     a 4.000E-04|   .                                       ..
     l          |  .                                          ..H
                |  .                                      ....  P
     C          |  .                                  ....
     P 3.000E-04|  .                              ....
     M          |  .H   H                     ....
                | . .. . .                ....
                | ..  H   .          ...H.
       2.000E-04| P.       .   ...H..
                | .         H..
                | H
                |
       1.000E-04|
                |
                |
                |
       0.000E+00-----+----+----+----+----+----+----+----+----+----+
          0.0E+00   1.0E+01   2.0E+01   3.0E+01   4.0E+01   5.0E+01
     Time (Hrs), Treatment: H=H2O  P=pathogen


     III. Constants
     The constants ABCISSA,ORDINATE, and MAXPOINTS are defined in the 
     constant definition part of the main procedure of LINEPLOT.  These 
     values are hardware-dependant and may need to be changed, depending on 
     the printer or computer being used.  To change them, it is necessary to 
     change their values in the Pascal text and re-compile. 

     ABCISSA
     ORDINATE
     The constants ABCISSA and ORDINATE control the actual printing size of 
     the graph.  ABCISSA specifies the number of characters used to print 
     each line in the graph (ie. the width of the X-axis) and ORDINATE 
     specifies the number of lines (ie. the height of the Y-axis).  The 
     actual values of these constants must be determined for each printer 
     used, since the ratio of character height to character width varies.  
     The relation 
                            ABCISSA/dX = ORDINATE/dY

     is true where dX is the number of characters per inch (cpi) and dY is 
     the number of lines printed per inch (lpi). Thus, for a printer which 
     prints 8 lpi and 10 cpi the corresponding values for ABCISSA and 
     ORDINATE could be 100 and 80, respectively.  While these values are 
     suitable for wide forms, 8-1/2 x 11 inch forms need smaller values, such 
     as 50 and 40. By default, ABCISSA= 50 and ORDINATE=40.

     MAXPOINTS
     MAXPOINTS is the maximum number of data points that can be read at one 
     time by LINEPLOT (see INPUT FILE section).  This value is dependant upon 
     the user memory available on the computer being used.  For an AppleII 
     with 48K, this value is set to 1000. 

     MAXREAL
     MAXREAL is the maximum absolute value that a real number may have.  This 
     is hardware and compiler dependant.


     IV. Parameters

     ABCISSA
     ORDINATE
     Number of characters and lines to be used for X (abcissa) and Y
     (ordinate) dimensions, respectively.

     MINHSCAL
     MAXHSCAL
     MINVSCAL
     MAXVSCAL
     MINHSCAL and MAXHSCAL are the minimium and maximum coordinates of the 
     horizontal scale.  Similarly, MINVSCAL and MAXVSCAL are the minimum and 
     maximum coordinates of the vertical scale.  The following limits are 
     placed on their values: 

          parameter               lower limit             upper limit
          -----------------------------------------------------------
          MINHSCAL                   -MAXREAL                MAXHSCAL
          MAXHSCAL                   MINHSCAL                 MAXREAL
          MINVSCAL                   -MAXREAL                MAXVSCAL
          MAXVSCAL                   MINVSCAL                 MAXREAL

     In earlier versions of LINEPLOT, which used fixed decimal notation for 
     printing the scales, it was necessary to include a scale factor in the 
     titles to indicate by which number (usually a power of 10) the real 
     values had been multiplied to give the values shown on the scale. This 
     is no longer necessary, since the current version of LINEPLOT prints 
     scales using floating point notation. 

     HAX
     VAX
     HAX and VAX are, respectively, the scale coordinates of the horizontal 
     and vertical axes.  Thus, HAX refers to some point on the vertical scale 
     through which the horizontal axis goes.  Similarly, VAX is a point on 
     the horizontal scale through which the vertical axis goes.  HAX and VAX 
     may be set to values beyond the horizontal and vertical scale limits, 
     which will result in the axis being omitted. 

     SCALES
     By default, SCALES=Y which results in the scales being printed. For some 
     graphic or pictoral purposes, it may be desirable to omit the scales by 
     setting SCALES equal to N. 

     AXES
     By defalult, AXES=Y which results in the axes being included in the 
     graph.  AXES=N omits the axes from the graph. 


     V. Input File
     The input datafile contains all the information necessary to produce the 
     graph, including titles, scale and axis parameters, graph type 
     specifications, and datapoints.  The following general formula describes 
     the input file.  <Items enclosed in angle brackets> represent 
     information that must be supplied by the user. 

     <horizontal title>
     <vertical title>
     <MINHSCALE> <MAXHSCALE> <MINVSCALE> <MAXVSCALE> <HAX> <VAX>
     <set of points>

     There may be one or more <set of points>.  This section of the file is
     further described below:

     <graphtype> <n - the number of points> <plotting character>
     <X1> <Y1>  <X2> <Y2> ... <Xn> <Yn>   <radius (only if graphtype=O) >

     Descriptions:

     <horizontal title>
     <vertical title>
     Any string of characters, not to exceed ABCISSA in length. Each must be 
     on a separate line. Titles may be blank lines. 

     <MINHSCAL> ... <HAX>
     These parameters as described above must appear in the order shown
     but do not need to be on separate lines.

     LINEPLOT reads in the titles and parameters and initializes the graph. 
     Next, sets of datapoints are read in, along with directives which tell 
     how each set of points is to be plotted. The items below must all be 
     separated by blank spaces or carriage returns. 

     <graphtype>
     Several values are allowed.  P specifies that only the datapoints are to 
     be plotted on the graph.  C specifies that adjacent points are to be 
     connected by straight lines, as seen in the example above.  L directs 
     LINEPLOT to draw the best straight line through all the data points, 
     using the method of least squares.  O specifies that a circle is to be 
     drawn, centered on the point which follows.  O requires that a radius 
     for the circle be specified. 

     <n- number of points>
     n tells how many datapoints are included in this dataset.  This number 
     must not exceed MAXPOINTS. If <graphtype>= O then n must be 1. 

     <plotting character>
     This may be any non-blank character.  It will be used to print each 
     point in the point set that follows. 

     <X1> <Y1> ... <Xn> <Yn>
     This is a set of exactly n cartesian coordinates.  Numbers must be 
     separated by blank spaces or carriage returns.  Points which do not fall 
     within the limits of the scales are not printed in the graph.  If 
     <graphtype> = O (for a circle) then only one point is listed.  This 
     point will be the center of that circle.  Only the parts of the circle 
     within the scale boundaries will be included in the graph. 

     <radius>
     Iff <graphtype> = O, a circle is to be drawn on the graph, and a radius 
     value must be specified.  This can be any non-negative number, and 
     should be within the range of the scales. 


     VI. Usage Notes
     1.  Since many sets of points may be plotted on the same graph, it is 
         possible to circumvent the limitation of MAXPOINTS by plotting a 
         large dataset as two or more small datasets.  Thus, if MAXPOINTS= 
         1500, one could plot a set of 2000 X/Y coordinates by specifying two 
         datasets, the first with 1500 and the second with 500. 

     2.  LINEPLOT can draw lines through any set of two or more points, 
         whether or not the points themselves are within the SCALE 
         boundaries.  However only that part of the line that falls within 
         the SCALE boundaries will actually appear on the graph. 

