CHAPTER 15    USING THE PLOTTING COMMANDS





            15.1 THE XYPLOT COMMAND



                 Entering the command XYPLOT at the keyboard, will prompt the

            user  for  the name of a character file containing data which the

            user may wish to plot.  The command XYPLOT  invokes  the  program

            XYPLOT_PROGRAM  which  contains  a user friendly interface to the

            general  two-dimensional  plotting  subroutine   XYPLOT.    While

            programmers  may  wish  to  call the subroutine XYPLOT from their

            application in order to obtain maximum flexibility,  the  command

            XYPLOT  provides  a  quick and convenient way to plot data from a

            character file.  The user is first prompted  for  the  number  of

            header  lines  (default  =  1),  and then for the file name.  The

            number of lines in the file is unrestricted, as are the number of

            simultaneous  plots.   This is accomplished by the use of dynamic

            memory.  The user is next prompted for the  abscissa  columns  in

            the  file,  and  then  for  the ordinate columns.  The numbers of

            columns entered should, of  course,  match.   Next  the  user  is

            prompted      for      a      setup      file      (default     =

            [MIIPS.PLOT]XYPLOT_SETUP.DAT).  An example of  a  setup  file  is

            given below.



             LINE VECTOR STYLE

             0

             1

             2

             3

             4

             5

             PEN WIDTH

             20

             LINE TYPE

             -1

             0

             SYMBOL

             0

             1

             2

             3

             4

             5

             6

             7

             8

             9

             10

             COLOR

             16776960        Yellow

             16711935        Magenta

             65280           Green

             16711680        Red

             255             Blue

             14518272        Orange


                                                                Page 2





             65535           Cyan

             7811840         Brown

             5570560         Raspberry

             4465152         Olive

             1170756         Violet

             11149824        Rust

             8943581         Azure

             10044433        Tan

             X LABEL

             T1

             Y LABEL

             Y Axis

             TITLE

             Anonymous



                 Each keyword for a  variable  is  followed  by  the  desired

            parameters,  with  successive lines assigned to successive plots.

            If the number of plots one needs to make is less than the  number

            of lines in the file, the program simply ignores the extra lines.

            If the number of plots one needs to  make  is  greater  than  the

            number  of  lines  for  a  particular  parameter in the file, the

            program will roll over the values.   The  keyword  and  the  data

            should  begin  on the 2nd column or beyond since FORTRAN uses the

            first columns for carriage control information.   Note  the  

            included in the X AXIS value for this example.  This is a control

            character, which will force the following 1 to be a subscript.

                 The full explanation of the parameters is given in Volume 3,

            Chapter  7, under the description of subroutine XYPLOT.  Once the

            plot  is  displayed  on  a  graphics  terminal,  the   user   may

            interactively alter the plot as described in the above chapter.





            15.2 THE PLOT COMMAND



                 The command PLOT sends the information  from  the  universal

            plot file to a specific plotting device.  Plot files are produced

            by several of the options in MIIPS, e.g., DA, DG, PL,  RG,  etc.,

            as  well  as auxiliary programs which call the subroutines XYPLOT

            and MESHPLOT.  Each plot file may contain one or more  individual

            plots.   Once  a plot file is created, no further alterations may

            conveniently be made to it.  The PLOT command  runs  the  program

            PLOTCOM  which  parses a file specification and qualifiers in the

            same way that the VMS operating system does.  Note that the first

            three  letters  of  a  command  qualifier  are sufficient for its

            execution.





            15.2.1 PLOT COMMAND PARAMETERS



            The format of the plot command is $PLOT file-specification.



            The file-specification  specifes  the  file  which  contains  the

            plot(s).   If  it is omitted, the file name defaults to PLOT.PLT.

            When the name is given, the extension must also be included.


                                                                Page 3





            15.2.2 PLOT COMMAND QUALIFIERS



                 The command qualifiers are listed below.



                 Command Qualifiers               Default

                 Command Qualifiers               Default



                 /DEVICE  = device-name           DEVICE=LASERGRAFIX



                 /COPIES  = number                COPIES=1



                 /NUMBER  = number                Plots all plots on the

                                                  Lasergrafix and Printronix,

                                                  NUMBER=1 (other devices)



                 /ROTATE  = angle                 ROTATE=0.0



                 /SCALE   = scale factor          SCALE=1.0



                 /XOFFSET = inches                XOFFSET=0.0



                 /YOFFSET = inches                YOFFSET=0.0





            15.2.3 DESCRIPTION OF COMMAND QUALIFIERS



            /DEVICE= device-name



                 Specifies  the  device  on  which  the  plot  will   appear.

                 Currently,   when   adding   new  plot  devices  for  a  new

                 installation   of   MIIPS,   source   code   in   the   file

                 [MIIPS.PLOT]PLOTCOM.FOR  must  be  modified, and the routine

                 recompiled  and  relinked.   The   following   devices   are

                 currently available:



                 TEKTRONIX -    the plot will be displayed on  a  Tektronics,

                                VT100   with  Retrographics,  or  Visual  550

                                graphics terminals.



                 GRAPHON -      the plot  will  be  displayed  on  a  GraphOn

                                graphics terminal.



                 CODONICS -     the plot will  be  displayed  on  a  Codonics

                                graphics terminal.



                 MICROTERM -    the plot will be  displayed  on  a  MicroTerm

                                graphics terminal.



                 VERSATERM -    the plot will be  displayed  on  a  VersaTerm

                                graphics terminal emulator.



                 LASER -        the plot will be printed on a QMS Lasergrafix



                 APPLE -        the plot will be printed on the  Apple  Laser

                                Writer  on  queue  APPLELASERWRITER  at  U of

                                Mich.


                                                                Page 4





                 APPLE2 -       the plot will be printed on the  Apple  Laser

                                Writer onqueue APPLELASERWRITER2



                 APPLE3 -       the plot will be printed on the  Apple  Laser

                                Writer on queue APPLELASERWRITER3



                 APPLE4 -       the plot will be printed on the  Apple  Laser

                                Writer on queue APPLELASERWRITER4



                 APPLE5 -       the plot will be printed on the  Apple  Laser

                                Writer on queue APPLELASERWRITER5



                 APPLE6 -       the plot will be printed on the  Apple  Laser

                                Writer on queue APPLELASERWRITER6



                 LPS40 -        the plot will be  printed  on  the  LPS40  on

                                queue LPS40



                 EPS -          the plot will be converted to an Encapsulated

                                PostScript file.  The resulting VECT.RPL file

                                can then be referenced in a TeX file in order

                                to  combine  text and plots on the same page.

                                One can then use for example the TeX  command

                                special{illustration vect.rpl scaling 500}.



                 POSTSCRIPT -   the plot will be converted  to  a  POSTSCRIPT

                                file.    This   is   very  useful  since  the

                                resulting VECT.RPL file can be  sent  to  any

                                Laserwriter with Postscript capabilities.



                 GRINNELL -     the plot will displayed on the Grinnell



                 TRAPIX -       the plot will displayed on the Trapix



                 PRINTRONIX -   the plot will be printed  on  the  PRINTRONIX

                                printer.   For  long  plots  this  may take a

                                considerable time,  and  the  plot  could  be

                                submitted as a batch job.



                 4662 -         the plot will be  printed  on  the  Tektronix

                                4662  flat  bed  plotter.   The paper and pen

                                should be set up correctly before plotting.



                 RAMTEK -       the plot will appear on the RAMTEK.



                 HOUSTON -      the plot is sent to the HOUSTON plotter.  The

                                paper  and  pen  should  be  set up correctly

                                before plotting.



            /COPIES=number



                 Specifies the  number  of  copies  of  the  plot  which  are

                 required.   This qualifier only applies when the plot device

                 is the Lasergrafix or the Printronix.


                                                                Page 5





            /NUMBER=number



                 Specifies which plot in a multi-plot file will be displayed.

                 By  default,  if  the  plot device is the Lasergrafix or the

                 Printronix, all plots in the file are plotted.  For all  the

                 other  devices  only  the  first  plot  is displayed if this

                 qualifier is absent.  Overlapping plots in a multiplot  file

                 may be created on a plotdevice if NUMBER=-1.





            /ROTATE=angle



                 Specifies an angle through which a  plot  will  be  rotated.

                 Rotation takes place about the origin of the plot device and

                 occurs after offseting.  A positive angle rotates  the  plot

                 counterclockwise.





            /SCALE=scale factor



                 Specifies a factor by which the size of the plot  is  to  be

                 multiplied.   That  is,  /SCALE=0.5  will cause a plot to be

                 displayed at half normal size,  /SCALE=3.0  will  cause  the

                 plot to be displayed at three times normal size.


                                                                Page 6





            /YOFFSET=inches



                 Specifies offsets by which the plot will be shifted from its

                 normal  position  on  the screen or paper.  A positive value

                 shifts the plot either to the right or up.





            15.2.4 EXAMPLES



            1.  $PLOT/DEV=T/SCALE=2.0



            The plot will appear on a graphics terminal, at twice the  normal

            size.



            2.  $PLOT/COPIES=3 PLOT.OLD



            Three copies of each plot in the file PLOT.OLD will be printed on

            the LASERGRAFIX (the default device).





            15.5 USEFUL PARAMETERS



            Graphs:



            DEVICE      SCALE       XOF         YOF         ROTATE

            Lasergrafix  1.2        1.0         0.5            0

            Lasergrafix  1.0        1.5         1.0            0

            Lasergrafix  1.2        0.3       -10.3           90

            Postscript   1.0        1.0         1.5            0

            Postscript/  0.25       0.25       -1.8           90

             Ghostview



            Contour Plots



            DEVICE      SCALE       XOF         YOF         ROTATE

            Lasergrafix  1.85       1.5       -10.8           90

            4662         1.85       1.2         0.5            0

            Printronix   2.2        1.38        0.27           0

            Postscript   1.85      -1.5       -10.8           90