                                                                                                                                                                                                                                                                                                   SLAC COMPUTATION GROUP                       CGTM No.  178            Stanford, California                  Revised August 1978;                                                Revised November 1980;                                                   Revised April 1987;                                                  Revised October 1989                                                                                                                                                                                                                                                      Top Drawer                                                                                                                                                                                                                                                                           Roger B. Chaffee                                                 Computation Research Group                                        Stanford Linear Accelerator Center                                                                                                                                                                                                                                                                                                                                         MEMORIAL                                                                                                          Roger B.  Chaffee,  who  conceived and executed,  TopDrawer,          died on June 4, 1989. In a sense, at least, his statement in          the introduction, "...and the program is still evolving," is          no longer in force.  Roger had a great love of simple things          and of informality.  Though the  manual has been reworked by          other hands,  it still bears a flavor of these ideals.   The          program  itself,    though  heavily   layered  with   "added          functionality"  over the  years  by  Roger and  others,   is          stamped  with some  of the  same  character.   Though  these          "layers"  added great  complexity,  they  were important  to          Roger  who  was  extremely  responsive  to  user  needs  and          meticulous  in choosing  intuitive  responses and  defaults.          Because of these convolutions,  there  are still a few parts          of the  program that don't quite  work right,  and  I'm sure          Roger,   had there  been time,   would have  been much  more          diligent about fixing things and adding new innovations than          those of  us who have been  "minding the store"  since Roger          left SLAC in 1983.  But across  the face of the world,  from          Europe to  Japan,  there are  many hundreds of  admirers who          have grown  to love TopDrawer,  warts  and all.  It  is some          consolation for those of us who were Roger's friends to know          that his spirit yet endures.                                                                                                                                             Bill Johnson                                                          October 27, 1989                                                                                                                                                                                                                                                                                                                                          Section 1                                                                                                                                  INTRODUCTION                                                                                                        Top Drawer  is a  program developed at  SLAC to  display the          kinds of data that physicists produce.  It makes histograms,          scatter plots, data points with error bars and plot symbols,          curves passing  through data points,  and  elaborate titles.          Because of its restricted applicability,   Top Drawer can be          controlled by a relatively simple set of commands,  and this          control is  further simplified by  the choice  of reasonable          default values for the plot parameters.  Despite this empha-          sis on simplicity, Top Drawer plots are suitable for presen-          tation at  conferences and in  journals.  This  represents a          remarkable step forward in the  preparation of data for pub-          lication,  which is otherwise a tedious and lengthy process.          Even for preliminary work,  turning a list of numbers into a          graph is so simple that the  user is not distracted from the          analysis itself.                                                                                                                            There is very  little facility in Top  Drawer for arithmetic          manipulations.   Top Drawer generally  assumes that the user          has his data already,  and wants it displayed to best advan-          tage.  For a function evaluation or data fitting, one should          use something like APL, Speakeasy, or a statistical analysis          package,  which have more capabilities for calculation,  and          fewer for elaborate and detailed plotting.                                                                                                  Top  Drawer  was written  by  one  person  who works  for  a          research group,  and the program is still evolving.   All of          these factors  indicate the informal  nature of  support for          Top Drawer-- features (and bugs) may be added at any time.                                                                                                                                                                                                                                                         - 1 -                                                                                                                                                                                                                                                        1.1   OUTPUT                                                                                                                                Output  from Top  Drawer is  of  two kinds.    The first  is          printed immediately  on the screen  of a  graphics terminal,          such as the Tektronix 4013,   or similiar device.   (See the          SET DEVICE command.)    The second type is  the graphic out-          put--the plots--which ultimately are drawn  on paper,  a CRT          screen, or photographic film by some sort of graphic device.          The process involved in printing  the plots and getting them          to the user depends on the device that is used.                                                                                             Connection  to the  graphic device(s)   used  for output  is          through the SLAC Unified Graphics System (U.G.),  so output          can  be made  on any  non-interactive device  known to  U.G.          This includes such devices as the Tektronix 4013, the Versa-          tec Electrostatic  plotter,  the Imagen laser  printers,  or          other graphics printers.  Many of the features of a plot can          be described by the user, with control cards containing key-          words and values.   In the absence of specific instructions,          Top Drawer chooses values based on  the given data.   A good          plot can often  be made just from the data  points,  with no          additional instructions.                                                                                                                    Top Drawer is to be run as a self-contained program, reading          a data file of TopDrawer commands.   At SLAC, the device may          be specified in a list of  parameters,  and passed on to the          main program by a REXX EXEC.  Otherwise, the SET DEVICE com-          mand should be used as one of the first cards.                                                                                              )   Robert Beach,   The SLAC  Unified  Graphics System  for          FORTRAN 77, CGTM No.  203 (August 1981).                                                                                                                                                                                                                                                1.2   INPUT                                                                                                                                 Input for Top  Drawer is a data file which  is normally pre-          pared using a text-editing system such as XEDIT.   This file          is a sequence  of commands,  one or more  per record,  which          describe the plots to be made.  The commands consist of key-          words,  which are  English or technical words,   and values.          The command language is limited,  and the syntax is not Eng-          lish,  so it is not generally possible to generate a correct          Top  Drawer  command  from an  English  description  of  the          desired result.   However, it is often possible to infer the          effect of a given Top Drawer command on the plot to be made,          which makes input listings easy to read.                                                                                                                                                                                                     - 2 -                                                                                                                                                                                                                                                        1.2.1   Input Formats                                                                                                                       Data and commands are read from the input file, Fortran unit          5.    Input is free-field.    Field separators are $ * / , =          and blank.   Input values may be given in integer,  decimal,          or exponential notation.   (As a  general rule,  any Fortran          output, with I, F,  E,  or D format,  is a legal input value          for Top Drawer.)                                                                                                                            Keywords are recognized  by comparing the input  string to a          list of acceptable words.    Keywords  may be abbreviated to          as few characters as will match one and only one word in the          list, to a minimum  of two characters.    (Of  course,  one-          character keywords, such as 'X',  are matched by one charac-          ter.)  Top  Drawer reads  commands from  left to  right,  so          parameters follow the keyword they modify.  Independant key-          words may come in any order in the command,  but in the case          of conflicting keywords,  the rightmost  is used since it is          the last one scanned.                                                                                                                       Comments on input  cards may be enclosed  in parentheses ().          All enclosed characters are ignored.  Comment fields are not          continued to the next line,  whether or not they are explic-          itly terminated.                                                                                                                            A semicolon (;) ends the current command.  In this way, mul-          tiple commands and/or data points may be entered in a single          record.                                                                                                                                                                                                                                      - 3 -                                                                                                                                                                                                                                                        1.3   ABOUT THIS NOTE                                                                                                                       This note is  intended as a reference manual  rather than an          introduction.    If you are just  starting to use Top Drawer          stop reading  this and  get "Introduction  to Top  Drawer",          which will show you some of the  things you can do,  and get          you started....    The information in  this note is intended          for "random access" reading, rather than sequential.   Right          now,  put  a paper  clip or a  piece of  Scotch tape  on the          "Anatomy of a Plot" section,  and look at that picture for a          while.   You will  want to refer to it while  you read about          the various commands.                                                                                                                       Read the rest of this  chapter lightly.   The information in          it is technical,   and it refers to  commands and parameters          which  haven't  been  explained.   Later,   when  a  command          description refers to   the  DATA  coordinate  system  or  a          device-generated character  string,  you  will want  to know          where to find an explanation.                                                                                                               The other chapters should be read in "browse" mode.  Look at          the lists of commands,  pick keywords which sound as if they          might produce  an effect that you  could use,  and  read the          description of that command.                                                                                                                Some of  the material in  this note  is specific to  SLAC VM          under CMS.   Top Drawer now lives in several different envi-          ronments,   with  different operating  systems  and  graphic          devices,  and the details of getting  a picture will be dif-          ferent in each situation.   If Top Drawer has been installed          for general use, there should be another note describing the          local conventions.   If you are using it on an informal ("at          your own risk") basis, remember that Top Drawer is a Fortran          program,   and uses  standard  Fortran  conventions and  the          graphics drivers that are indigenous to your system.                                                                                        ) Roger B.   Chaffee, Introduction to Top Drawer,  CGTM No.          189 (August 1977).                                                                                                                                                                                                                                                                                                 - 4 -                                                                                                                                                                                                                                                        1.4   THE ANATOMY OF A PLOT                                                                                                                 The figure shows some of the  features of a Top Drawer plot,          and indicates the commands which control them.                                                                                                                                                                                                                                                                   This figure is in                                                     the SAMPLE file on the                                                Top Drawer tape.                                                                                                                                                                                                                                                                          - 5 -                                                                                                                                                                                                                                                        1.5   COORDINATE SYSTEMS                                                                                                                    There are two  coordinate systems used by  Top Drawer.   The          first is called  the 'TEXT' system,  because  it is normally          used for giving the positions of titles.   The second is the          'DATA' system,  which is the  coordinate system in which the          data points are normally plotted.                                                                                                                                                                                 1.5.1   The TEXT Coordinate System                                                                                                          The  TEXT system  measures the  positions of  points on  the          screen or paper,   in some units such as  inches or centime-          ters.   It is specified by the  graphic device in use and by          the SET SIZE command.   The point  (x,y)  = (0,0)  is at the          bottom left of the screen or paper.  (See the description of          the SET SIZE command for  details about units.)  Any command          which generates  graphic output  forces the  TEXT coordinate          system to be defined,  with the default device (Imagen 8-300          at SLAC) and/or size (10 by 7.5 inches) if they haven't been          set explicitly.   The TEXT coordinate system is redefined by          a SET  DEVICE or  SET SIZE command,   but this  requires the          start of a  new picture.   It is not  possible to 'undefine'          it.                                                                                                                                                                                                               1.5.2   The Window                                                                                                                          Data plotting is  done in a rectangular  area (the 'window')          which is normally within the limits  of the screen or paper.          The position of the window in  the TEXT coordinate system is          set by the SET WINDOW command.   The window position must be          defined when the DATA coordinate system is defined,  or when          a title is made with a position relative to the window (TOP,          BOTTOM, LEFT, or RIGHT).  The default window position leaves          a 10% border on the top and  right,  and a 20% border on the          bottom and left.  Axis labels and titles are put outside the          window.                                                                                                                                                                                                                                      - 6 -                                                                                                                                                                                                                                                        1.5.3   The DATA Coordinate System                                                                                                          The DATA  system maps points to  be plotted into  the window          area.    The mapping does not have to be linear--logarithmic          scales are part of the system,  as well as linear and calen-          dar scales, and others could be defined by the user.  Param-          eters for the DATA system are set  by the SET LIMITS and SET          SCALE commands or implicitly by the data points known to Top          Drawer at the time the DATA system becomes defined.                                                                                         Plotting points or  titles in the DATA mode,   or putting on          labelled axes,  forces  the DATA system to  be defined.   It          becomes undefined when  new data points are read  in,  and a          NEW FRAME, SET DEVICE, or SET WINDOW command is given.   New          data points alone, or the change in picture,  are not suffi-          cient, and the old system is retained.   The DATA system and          the window  become undefined when  the TEXT system  is rede-          fined.                                                                                                                                                                                                                                                                                  1.6   PLOTTING TEXT                                                                                                                         1.6.1   Character Size                                                                                                                      Text is  specified by the  TITLE command,  and  other symbol          plotting is done for axis labels and plot symbols.  For each          of these, one of the parameters used is the SIZE.   The con-          vention used in Top Drawer is  that character size is speci-          fied in tenths  of an inch.   For instance,   for SIZE=2 the          spacing between characters is  nominally 0.2 inches.   (Note          that character size can be a  decimal fraction as well as an          integer.   SIZE=2.5 is halfway between SIZE=2 and SIZE=3.)                                                                                  This nominal value is affected  by several factors.   First,          an  overall reduction  of  the  plot changes  the  character          sizes.  This is controlled by the SET SIZE command.                                                                                         Second,  for the  more elaborate DUPLEX character  set,  the          character spacing is adjusted according  to the width of the          particular characters used.   For  instance,  the letter 'm'          takes about  twice as much space  as the letter  'i'.   This          makes it difficult to achieve an exact length or fill a par-          ticular space with a string,  but the pleasing appearance is          generally a more important factor.                                                                                                                                                                                                           - 7 -                                                                                                                                                                                                                                                        1.7   DEFAULT VALUES                                                                                                                        There are four  different levels of permanence  for each Top          Drawer parameter which  can be set or changed by  a SET com-          mand.   Some values can be changed  only by an explicit com-          mand,  others revert instantly to the default,  and most are          treated in an intermediate fashion.  The four levels are:                                                                                   Level 1 parameters  are never reset by Top  Drawer,  but are          changed only by an explicit  command.    This group contains          the DEVICE and the SIZE values associated with it.   It also          includes the parameters  associated with the input  and out-          put,  which are  the FILE units,  the CARD  LENGTH,  and the          FORMAT.  It contains the FONT, which is expensive to change.          And finally, it contains the MODE values.                                                                                                   Level 2 parameters are set to  the default value by the com-          mands NEW FRAME (or NEW PLOT)   and SET DEVICE,  which clear          the screen  or advance to  a clean plotting  surface.   Most          parameters belong to this group.                                                                                                            Level 3 parameters  define the DATA coordinate  system,  and          are given by  the SET LIMITS and SET  SCALE commands.   With          one exception, all these parameters are reset by a NEW FRAME          or SET DEVICE command, and the parameters for a single coor-          dinate are  reset by a SET  WINDOW command for  that coordi-          nate.   The exception is that if  new points are not read in          to the  Top Drawer  data storage,  the  old limit  and scale          parameters  are retained  even  across  a SET  DEVICE,   SET          WINDOW,  and NEW  FRAME command.   (Of course,   they may be          reset explicitly.)                                                                                                                          Level 4 parameters are set  only during the current command.          The values are not retained.  This group includes all param-          eters which are set in an  action command,  such as the tex-          ture of a JOIN or the size of a TITLE.  There is generally a          corresponding SET command  (e.g.   SET TEXTURE or  SET TITLE          SIZE) which produces a level 2 change in the same parameter.          SET GRID also  gives level 4 parameters,  since  the grid is          made only on the current plot.                                                                                                                                                                                                               - 8 -                                                                                                                                                                                                                                                        The following table gives some of the Top Drawer parameters.                                                                                     Level    Command             Default Value                                                                                                    2    SET ARROW                                                                SIZE               2                                                  FLARE              0.5                                        2    SET AXIS              ON                                         2    SET BAR SIZE          0.1                                        2    SET BOX SIZE          1 1                                        1    SET CARD LENGTH       72                                         2    SET COLOR             Black                                      1    SET DEVICE            4013 Interactive                           2    SET DIAMOND SIZE      1 1                                        2    SET ELLIPSE SIZE      1 1                                        1    SET FILE                                                                 INPUT              5                                                  OUTPUT             6                                          1    SET FONT              Extended                                   1    SET FORMAT            (80A1)                                     4    SET GRID              OFF                                        2    SET INTENSITY         2                                          2    SET LABEL                                                               LEFT, BOTTOM        ON                                                TOP, RIGHT          OFF                                        3    SET LIMITS            Depend on data                             2    SET ORDER             X Y DX DY SYMBOL                           2    SET OUTLINE           ON                                         3    SET SCALE             Linear 6 -5 Base 10                        1    SET SIZE              10 BY 7.5 UNITS 1                                  REDUCE             Depends on Device                          2    SET SYMBOL            Blank (plotted as dots)                    2    SET TEXTURE           Solid                                      2    SET TICKS             ON                                         2    SET TITLE SIZE        2                                          2    SET WINDOW            In 20% from screen edge                                               on bottom and left, 10%                                               on top and right.                                                                                                                                                                                                                                                                - 9 -                                                                                                                                                                                                                                                        1.8   COMMANDS                                                                                                                              There are four types of commands:  DATA,  ACTION,  SET,  and          CONTROL.                                                                                                                                    DATA commands  give points  to be  entered  into Top  Drawer               storage,  or they specify operations to be performed on               the stored data.    The basic DATA command  is the data               point, which can give coordinate values, error-bar val-               ues,  and a symbol.    Other  DATA commands are SMOOTH,               which replaces  the stored  data values  by new  values               which make a smoother curve,   and BIN,  which replaces               the stored data values by  a summary of their distribu-               tion.                                                                                                                                  ACTION commands produce  some kind of graphic  output.   The               ACTION commands are PLOT,  HISTOGRAM,  JOIN,  BARGRAPH,               TITLE, and NEW FRAME.                                                                                                                  SET commands describe  the output which  is to be  made,  by               setting or changing parameters.  They do not themselves               cause output.                                                                                                                          The notation used in  command description is taken  from the               Xedit manual.   Briefly,  "|"  means "OR" and separates               alternatives.    Brackets [] enclose optional material.               Braces {}  enclose one or  more options,  one  of which               must be specified.   An  underscore indicates a default               option,  which  need not be given  explicitly.    Upper               case text must be used as specified.   Lower case indi-               cates text,  characters,  or values  to be given by the               user.                                                                                                                                                                                                                                                                                                         - 10 -                                                                                                                                                                                                                                                                                                                                                      Section 2                                                                                                                                ACTION COMMANDS                                                                                                       List of Action Commands                                                                                                                          ARROW FROM xxx yyy [DATA] [LESS ddd]                                          TO xxx yyy [DATA] [LESS ddd]                                          [SIZE xxx] [{FLAIR|FLARE} fff]                                                                                                      BARGRAPH [POINTS n1 [TO] n2]                                                [SOLID|DOTS|DASHES|DOTDASH|PATTERNED]                                                                                                 BOX xxx yyy [DATA] [SIZE dx [dy]]                                                                                                           CIRCLE xxx yyy [DATA] [SIZE dx [dy]] (Same as ELLIPSE.)                                                                                     DIAMOND xxx yyy [DATA] [SIZE dx [dy]]                                                                                                       ELLIPSE xxx yyy [DATA] [SIZE dx [dy]]                                                                                                       HISTOGRAM [POINTS n1 [TO] n2]                                               [SOLID|DOTS|DASHES|DOTDASH|PATTERNED]                                                                                                 JOIN [level] {SPLINE|GENERAL} [TEXT]                                    [SOLID|DOTS|DASHES|DOTDASH|PATTERNED|FUNNY]                                     [POINTS n1 [TO] n2]                                            makes a curve passing through given points.                                                                                            NEW FRAME [[ALIAS=]'alias']      starts a new page.                                                                                         PLOT [POINTS n1 [TO] n2]                                                   plots given points, with error bars and symbol.                                                                                        PLOT {AXIS|AXES}     plots the axes, but no points.                                                                                         TITLE [TOP|BOTTOM|RIGHT|LEFT|                                                 xxx yyy [DATA|XDATA|YDATA] [CENTER] [LINES=n]]                        [SIZE n] [ANGLE x] [SPACES n] [INDEX n] 'text'                CASE 'text'                                                           MORE 'text'                                                                writes text on plot.  The CASE card or parameter                      is optional.  It calls for fancy characters.                                                                                                                                                                                                                                                             - 11 -                                                                                                                                                                                                                                                       2.1   ARROW                                                                                                                                      ARROW FROM xxx yyy [DATA] [LESS ddd]                                          TO xxx yyy [DATA] [LESS ddd]                                          [SIZE xxx] [{FLAIR|FLARE} fff]                                                                                                 Draw an arrow  from one point  to another.    The coordinate               point  (xxx,yyy)  is   in the   TEXT coordinate  system               unless the DATA keyword is specified, in which case the               DATA coordinate system is used.                                                                                                        If the LESS parameter is used,  the result is an arrow which               goes toward or away from the indicated point,  but does               not extend all the way  to  the  point.    The distance               ddd  between the  arrow and  the point  is measured  in               units in the TEXT coordinate system, whether or not the               DATA system  is used to  specify the   point (xxx,yyy).               (This  parameter is useful  for   drawing an arrow from               the first character of a title,   or  for  pointing  at               some  plot  feature, without obliterating the character               or feature.)                                                                                                                           The SIZE parameter  gives the length of  the arrowhead--that               is, the altitude  of the  isosceles  triangle--measured               in tenths  of an inch.   FLARE  gives the ratio  of the               base to  the altitude,  which  is the  "fatness".   The               default  values are set by the SET ARROW command.                                                                                      Examples:                                                                                                                                        ARROW FROM 3 5 TO 3.5 5 (A horiz. arrow 1/2 unit long)                ARROW TO 3.5 5 FROM 195 8.3E5 DATA                                    ARROW FROM 1 1 LESS .3 TO 17.8 190 DATA LESS .2                                                                                                                                                              2.2   BARGRAPH                                                                                                                                   BARGRAPH [POINTS n1 [TO] n2]                                               [SOLID|DOTS|DASHES|DOTDASH|PATTERNED]                                                                                             Make a simple bargraph.   Bars are  centered on the given x-               values, with  heights given  by  the y-values.    Half-               widths can  be  given   by  the   dx-values,   or   Top               Drawer will choose an appropriate value.  The dy values               are not used.                                                                                                                          The SOLID, etc.,  keyword specifies the texture of the lines               to be drawn.    (See the description of the SET TEXTURE               command.)                                                                                                                                                         - 12 -                                                                                                                                                                                                                                                       The POINT range refers to the data  points by  the  order in               which   they  were  entered into  the  Top Drawer  data               arrays.  If one is given, only the given points will be               used in the graph.   However,   all the points that Top               Drawer knows about  will be used to  determine the plot               limits, if that is required.                                                                                                           Example:                                                                                                                                         BARGRAPH POINTS 11 TO 50                                                                                                                                                                                     2.3   BOX                                                                                                                                        BOX xxx yyy [DATA] [SIZE dx [dy]]                                                                                                      Draw a rectangle,  with sides parallel  to the plot axes and               center at the  given  point.    'DATA'  signifies  that               (xxx,yyy)   is  in the DATA coordinate system.   Other-               wise, it is taken in the TEXT system.                                                                                                  The size values are for the width  (dx)  and height (dy)  of               the  rectangle.     If the  height  is not  given,  the               width is used and the  rectangle becomes a square.   If               size values are not specified at all, the  values  from               the  SET  BOX SIZE command are used.                                                                                                                                                                                                                                               2.4   CIRCLE                                                                                                                                     CIRCLE xxx yyy [DATA] [SIZE dx [dy]]                                                                                                   CIRCLE is another word for ELLIPSE (q.v.).                                                                                                                                                                                                                                              2.5   DIAMOND                                                                                                                                    DIAMOND xxx yyy [DATA] [SIZE dx [dy]]                                                                                                  Draw a diamond, with axes parallel to the plot axes and cen-               ter  at   the  given point.    'DATA'   signifies  that               (xxx,yyy)   is  in the DATA coordinate system.   Other-               wise, it is taken in the TEXT system.                                                                                                  The size values are for the width  (dx)  and height (dy)  of               the diamond.    If  the height   is  not   given,   the                                                                                                           - 13 -                                                                                                                                                                                                                                                            width is used and the diamond becomes a square, rotated               at 45 to the plot axes.  If size values are not speci-               fied at all,  the values from the SET DIAMOND SIZE com-               mand are used.                                                                                                                                                                                                                                                                     2.6   ELLIPSE                                                                                                                                    ELLIPSE xxx yyy [DATA] [SIZE dx [dy]]                                                                                                  Draw an ellipse,   with axes parallel  to the plot  axes and               center  at  the  given point.   'DATA'  signifies  that               (xxx,yyy)   is  in the DATA coordinate system.   Other-               wise, it is taken in the TEXT system.                                                                                                  The size values are for the width  (dx)  and height (dy)  of               the ellipse.  If  the height  is  not  given, the width               is used and the ellipse becomes a circle.  If size val-               ues are  not specified at  all,  the values   from  the               SET  ELLIPSE SIZE command are used.                                                                                                                                                                                                                                                2.7   HISTOGRAM                                                                                                                                  HISTOGRAM [POINTS n1 [TO] n2]                                                  [SOLID|DOTS|DASHES|DOTDASH|PATTERNED]                                                                                         Top Drawer makes  simple histograms from data  points.   Bin               edges are put halfway between  the ends of the adjacent               error bars,  or  halfway between the  points   if there               are no error bars.                                                                                                                     The SOLID, etc.,  keyword specifies the texture of the lines               to be drawn.    (See the description of the SET TEXTURE               command.)                                                                                                                              The POINT range refers to the data  points by  the  order in               which   they  were  entered into  the  Top Drawer  data               arrays.  If one is given, only the given points will be               used in the graph.   However,   all the points that Top               Drawer knows about  will be used to  determine the plot               limits, if that is required.                                                                                                           Example:                                                                                                                                         HISTOGRAM POINTS 11 TO 50                                                                                                                                                                                                                                                                                     - 14 -                                                                                                                                                                                                                                                       2.8   JOIN                                                                                                                                       JOIN [level] {{SPLINE| GENERAL}                                           [POINTS n1 [TO] n2] [TEXT]                                            [SOLID|DOTS|DASHES|DOTDASH|PATTERNED|FUNNY]                                                                                        Draw a line from  point to point.   Error  bars and  symbols               are  not  used.    If 'level'  is specified,  it is the               number of straight line segments  which will be used in               connecting adjacent points.   If 'level' is not  speci-               fied, Top  Drawer chooses an appropriate value, depend-               ing on the number of points.                                                                                                           The GENERAL  curve is  calculated using  an algorithm  which               allows multiple-valued functions and repeated points.                                                                                  SPLINE  invokes a  natural  cubic spline  fit  to the  given               points.  (For the SPLINE fit, there is a maximum number               of  points,  and  either  the x-  or  y-values must  be               strictly increasing.    Top Drawer checks  these condi-               tions, and uses the GENERAL fit if they are violated.)                                                                                 TEXT instructs Top Drawer to use the TEXT coordinate system.               No plot axes  are made.  (Otherwise, the DATA system is               used, and axes are drawn if needed.)                                                                                                   The POINT range refers to the data  points by  the  order in               which   they  were  entered into  the  Top Drawer  data               arrays.  If one is given, only the given points will be               used in the graph.   However,   all the points that Top               Drawer knows about  will be used to  determine the plot               limits, if that is required.                                                                                                           The SOLID|DOTS|DASHES|DOTDASH|FUNNY  keyword  specifies  the               texture of  the  lines to   be  drawn.     FUNNY  gives               dots at odd intervals,  determined by the level parame-               ter and the joining algorithm.                                                                                                         (JOIN draws only the curve or line segments,  not the symbol               or error bars.    For symbol and error  bars,  you must               PLOT as well.)                                                                                                                         Examples:                                                                                                                                        JOIN                                                                  JOIN 1 DASHES (Joins with dashed straight lines)                      JOIN POINTS 1 TO 200 DOTS                                                                                                                                                                                                                                                                                     - 15 -                                                                                                                                                                                                                                                       2.8.1   The Join Algorithm                                                                                                                  The algorithm used for the GENERAL curve is an adaptation of               ACM algorithm #433, by Hiroshi Akima (C.A.C.M.   15, 10               pp 914-918 (Oct 72).), with control near cusps and dis-               continuities suggested by J.R.  Manning (Computer Jour-               nal 17, 2 p 181), and extended by some unpublished work               of Roger Chaffee and Anthony  Lawton.   It is unique to               Top Drawer.                                                                                                                                                                                                                                                                        2.9   NEW FRAME                                                                                                                                  NEW FRAME [[ALIAS=]'alias']                                                                                                            Start a completely new picture.   Untreated points are PLOT-               ted before going on.                                                                                                                   Examples:                                                                                                                                        NEW FRAME                                                             NEW FRAME ALIAS 'TRANSFER'                                                                                                                                                                                                                                                         2.10   PLOT                                                                                                                                      PLOT [POINTS n1 [TO] n2]                                                                                                               Plot the current points,  with the given error bars and sym-               bols.    This  command sets  limits if not already set.               If the current points have not been processed (i.e.  by               a PLOT,  JOIN,   or HIST command),  PLOT  is  performed               automatically  at  the end of  input,  or before  a NEW               FRAME or SET WINDOW command.                                                                                                           The POINT range refers to the data  points by  the  order in               which   they  were  entered into  the  Top Drawer  data               arrays.  If one is given, only the given points will be               used in the graph.   However,   all the points that Top               Drawer knows about  will be used to  determine the plot               limits, if that is required.                                                                                                           Examples:                                                                                                                                        PLOT                                                                  PLOT POINTS 20 TO 50                                                                                                                                                                                                                                                                                          - 16 -                                                                                                                                                                                                                                                       2.11   PLOT AXES                                                                                                                                 PLOT {AXIS|AXES}                                                                                                                       PLOT AXES plots the axes,  using all the current parameters,               but does  not   plot points.    The  points   in  point               storage will be used if it  is necessary to set limits.               Axes will  be plotted  even if  they have  been plotted               before.                                                                                                                                The axes are plotted automatically at the first PLOT,  HIST,               or JOIN command,  so PLOT  AXES is not normally needed.               It is useful for  special  effects  such  as making two               different x-axes for the same plot, as in the following               commands:                                                                                                                                 SET AXES ON RIGHT OFF                                                 SET LIMITS Y 0 TO 100                                                 PLOT AXES                                                             SET AXES OFF RIGHT ON                                                 SET LIMITS Y 0 TO 500                                                 PLOT AXES                                                                                                                                The two forms,  with AXIS and  AXES,   exist  only  for con-               venience.   They  are equivalent.                                                                                                      Example:                                                                                                                                         PLOT AXES                                                                                                                                                                                                                                                                          2.12   TITLE, CASE, AND MORE                                                                                                                     TITLE [TOP|BOTTOM|RIGHT|LEFT|                                                 xxx yyy [DATA|XDATA|YDATA] [CENTER] [LINES=n]]                      [SIZE n] [ANGLE x] [SPACES n] [INDEX n] 'text'                                                                                        [CASE 'case text']                                                                                                                          [MORE 'more text']                                                                                                                     "text" will be written on the  plot.   It must  be  enclosed               in  apostrophes   or quotes.     The  title   size  and               orientation,   and  the  position  of the first charac-               ter are set  by the other parameters on  the card.   If               the  text delimiter  ("  or ')  appears in  the text as               well,  it  must be doubled.    Thus,  'This  Exp''t' is               equivalent to "This Exp't".                                                                                                                                                                                                                                                                                   - 17 -                                                                                                                                                                                                                                                       If DATA is not specified, (xxx,yyy) are measured in the TEXT               coordinate system.   (See "Coordinate Systems".) 'TOP',               'BOTTOM', 'RIGHT', or 'LEFT', may  be  used instead, to               indicate a  position relative to the  current "window".               The picture in  the section called "Anatomy  of a Plot"               may help to  explain these terms.    If  no position is               given,  the text  will be placed below  the most recent               title line.   INDEX=n gives the  line  spacing  in this               case,   in multiples  of the  character spacing.    The               default is INDEX=2.                                                                                                                    If DATA is  specified,  (xxx,yyy)  are  in   the  coordinate               system  of  the  data points, as set by the most recent               SET LIMITS command  or operation with the  data points.               If XDATA or YDATA is specified, xxx or yyy respectively               will be  in the coordinate  system of the  data points.               (To avoid surprises,  place  TITLE commands which refer               to the data coordinate system after SET LIMITS commands               and data point entry operations.  If no data point lim-               its have been established, program errors may occur.)                                                                                  If CENTER is not specified, the given (x,y)  position is for               the center  of   the first  character  of   the  string               to be plotted.  If CENTER is specified, Top Drawer will               attempt to  place the first  character of   the  string               so that   the middle  of the  entire string  is at  the               given position.   This may not work right,  because  of               the variable character spacing which  is used for esth-               etic reasons, or because the string contains control or               positioning  characters   which   affect  the  physical               length.  In this case, SPACES=n can be used to tell Top               Drawer the width  of  the title, in character widths as               given by the SIZE parameter.   TOP, BOTTOM, RIGHT,  and               LEFT titles are always centered.                                                                                                       LINES  n moves  the starting  position  of the  line "up"  n               spaces.   Thus,  TITLE TOP LINES 3 'text' would put the               given text  in the right  place for a  three-line title               above the plot.  (Unless the window were set lower than               normal,  it would also put it  off the top of the paper               in this case.)                                                                                                                         SIZE n gives the approximate spacing between the letters, in               tenths of an inch.   (See "Text Plotting" for a further               explanation of character string sizes.)                                                                                                ANGLE x is in degrees,   measured counter-clockwise from the               x-axis.                                                                                                                                SPACES n  See the discussion under CENTER.                                                                                                  INDEX n  See the discussion under DATA.                                                                                                                                                                                                      - 18 -                                                                                                                                                                                                                                                       CASE 'case text' is optional and may appear on the same card               or the following   card.   It  modifies the  TITLE text               that it  follows.   It must correspond,   character for               character,  to  'text' in the preceeding  card.    Each               pair  of characters, the first  from the TITLE card and               the second from the CASE  card,  makes a character pair               which  will  be  interpreted  according  to  the   U.G.               extended- character-set  specifications,  described  in               the U.G. writeup (CGTM No.   203) and briefly listed in               Appendix A.                                                                                                                            For example,                                                                                                                                     TITLE BOTTOM 'E2IP3=-1'                                                    CASE    'LXLGX   '                                                                                                                would produce the x-axis title "e  to the i pi  equals minus               1",   since  L  as second  character of a pair produces               lower case Roman letters,  G produces lower case Greek,               and 2X  and 3X are  the control  characters specifying,               respectively,   "enter  superscript  mode"  and  "leave               superscript mode".                                                                                                                     The MORE command may follow a  TITLE command or a TITLE-CASE               pair.   The  'more  text' is  used as a continuation of               the text from the TITLE command.  MORE text may be mod-               ified by  CASE text  in the same   or  the   next input               line.   More  MORE commands may  follow,  to give up to               160 characters or character pairs  for the entire TITLE               string.                                                                                                                                For more examples,  see "Introduction  to Top Drawer",  CGTM               No.  189.                                                                                                                                                                                                                                                                                                     - 19 -                                                                                                                                                                                                                                                                                                                                                      Section 3                                                                                                                                 DATA COMMANDS                                                                                                                                                                              3.1   LIST OF DATA COMMANDS                                                                                                                      Data points: a data point command has only values,                         and no keyword.  See the SET ORDER command                            for an explanation of parameter position.                                                                                              BIN [BINS=n] [FROM xmin] [TO xmax] [BY dx]                                                                                                  SMOOTH {X|Y} [LEVEL n] [POINTS n1 [TO] n2]                                                                                                  {X|Y|DX|DY} [{BINS|POINTS}[n1 [TO] n2|n2]]                                    [FROM xxx] [TO xxx] [BY xxx]                                                                                                                                                                                                                                               3.2   DATA POINTS                                                                                                                           The basic DATA command is the  data point,  which  can  give               coordinate  values,   error-bar values,  and  a symbol.               This  "command" gives  points to  be  entered into  Top               Drawer storage.                                                                                                                        The SET ORDER  command specifies  the order  and meaning  of               values that appear  on a  data  card.   Each  value  is               a number or a symbol.    Values are separated by blanks               or some other separator, as explained in the section on               Input Formats.                                                                                                                         Examples:                                                                                                                                        10 3 50 10 0P                                                         10 1.2 5.e-9 '$' 23                                                    1                                                                                                                                                                                                                                                                                                            - 20 -                                                                                                                                                                                                                                                       3.3   BIN                                                                                                                                        BIN [BINS=n] [FROM xmin] [TO xmax] [BY dx]                                                                                             The data points  are replaced  by a new  set which  give the               frequency distribution of the old points.   (The origi-               nal values are  destroyed.)   To do this,   an array of               "bins"  is  made  with  width  and centers  as given in               the command.   If  no parameters are given  in the com-               mand,  a bin is centered on  each of the small ticks on               the x-axis,  as given by  the  SET SCALE command or the               default scaling.  Only linear scaling is allowed.                                                                                      As the points  are "binned",   each old  point has  a weight               given by  the  y-value for that point.  (If the y-value               is zero, or none was given,  then 1.0 is used.)  A  bin               is determined for each point, according to its x-value,               and the weight  for the point is added  to the contents               of the bin.   (If  the  x-error  for  the point is non-               zero,  then the point is taken as a normal distribution               centered  at the  x-value,  with  a standard  deviation               given by the x-error.)  (The y-errors of the old points               are not used.)                                                                                                                         The BIN command is usually followed by a HISTOGRAM command.                                                                                                                                                                                                                             3.4   FREQUENCY                                                                                                                             FREQUENCY is a synonym for BIN; see the above section.                                                                                                                                                                                                                                  3.5   SMOOTH                                                                                                                                     SMOOTH {X|Y} [LEVEL n] [POINTS n1 [TO] n2]                                                                                             Replace the  y-values specified by  new values which  give a               smoother curve.    The values  are  smoothed  according               to  a non-  linear algorithm  which  supposes that  the               given values  are from  a histogram  of equally  spaced               bins.   It is relatively insensitive to fluctuations in               individual  points.     (The   original    values   are               destroyed.)                                                                                                                            LEVEL n refers,  approximately,  to  the number of points on               each side of the  bin in question which will be used in               setting the value for that bin.                                                                                                                                                                                                                                                                               - 21 -                                                                                                                                                                                                                                                       POINTS n1  TO n2 specifies  the points,  of  those currently               present  in   the  Top  Drawer  point   storage,  which               will  be treated.    (Remember  that  point storage  is               restarted with point 1 after each PLOT,  JOIN,  or HIST               command.)                                                                                                                              Examples:                                                                                                                                        SMOOTH                                                                SMOOTH LEVEL 3                                                        SMOOTH Y POINTS 1 TO 100 LEVEL 5                                                                                                                                                                             3.5.1   The Smoothing Algorithm                                                                                                             The algorithm used for  the SMOOTH command was  developed by               John W. Tukey and Alberto Tubillo at SLAC.   It repeat-               edly transforms  the points  and the  residuals,  using               running medians,  running  means,  quadratic interpola-               tion,  and hanning.   Similar  smoothing algorithms are               described in  Tukey's book  Exploratory Data  Analysis,               although this particular combination of means, etc., is               not in the book, and may be unique to Top Drawer.                                                                                                                                                            3.6   X/Y BINS/POINTS                                                                                                                            {X|Y|DX|DY} [{BINS|POINTS}[n1 [TO] n2|n2]]                                   [FROM xxx] [TO xxx] [BY xxx]                                                                                                    Put a linear sequence  of values into one of  the data point               or error arrays.   It is  particularly useful for doing               the base axis of a  histogram,  or  installing constant               errors.                                                                                                                                POINTS means that the values are to be generated as defined.               BINS gives  values at the  centers of bins  whose edges               are specified by the command.  For instance,                                                                                                X POINTS FROM 0 TO 10 BY 1                                                                                                             gives 11 values: 0,1,2,...,10.                                                                                                                   X BINS FROM 0 TO 10 BY 1                                                                                                               gives   10   values:    0.5,1.5,2.5,...,9.5.     POINTS   is               assumed  if  neither  is specified.                                                                                                    n1 and n2 define  the indices in the Top  Drawer data array.               If not given, n1 is taken as 1.  Thus,                                                                                                      X BINS=10 FROM 0 TO 20                                                                                                                                            - 22 -                                                                                                                                                                                                                                                                                                                             gives 10 values: 1,3,5,...,19.                                                                                                              If there is insufficient information to make the array, e.g.               if only FROM  and TO are  given,  the current number of               data points is used for n2.                                                                                                            Example:                                                                                                                                         SET ORDER Y; 10; 6; 3; 8; 12; 14;                                        X BINS FROM 0 BY 2; HIST                                                                                                            is equivalent to                                                                                                                                 SET ORDER X Y                                                         1 10 ; 3 6 ; 5 3 ; 7 8 ; 9 12 ; 11 14 ; HIST                                                                                                                                                                                            - 23 -                                                                                                                                                                                                                                                                                                                                                      Section 4                                                                                                                                CONTROL COMMANDS                                                                                                      Examples of Control Commands                                                                                                                     DUMP [FLAGS]      is a debugging aid                                                                                                        END     (This command is not required.)                                                                                                     LIST [POINTS [FROM] n1 [TO] n2]                                              lists values currently in T.D. data buffers.                                                                                                                                                                                                                                4.1   DUMP                                                                                                                                       DUMP [FLAGS]                                                                                                                           This is a debugging command, not for general use.   The com-               mon  blocks,   or   only the  flag  settings,  will  be               dumped.                                                                                                                                                                                                                                                                            4.2                                                                                                                                              END                                                                                                                                    Stop reading input  cards.   This  command is  not required.               Top Drawer  normally stops processing at the end of the               input.                                                                                                                                                                                                                                  - 24 -                                                                                                                                                                                                                                                       4.3   LIST                                                                                                                                       LIST [POINTS [FROM] n1 [TO] n2]                                                                                                        LIST causes Top  Drawer to make  a list in  the line-printer               output  of   the  data currently   in the  data buffer.               This would be useful after a BIN, SMOOTH, or other com-               mand which changed the values.                                                                                                         The POINTS parameters allow  a partial listing.   n1  and n2               refer to the order of the points.                                                                                                                                                                                                                                                                             - 25 -                                                                                                                                                                                                                                                                                                                                                      Section 5                                                                                                                                  SET COMMANDS                                                                                                        List of SET Commands                                                                                                                             SET ARROW [SIZE xxx] [{FLAIR|FLARE} fff]                                                                                                    SET {AXIS|AXES}                                                              [{ALL|TOP|BOTTOM|RIGHT|LEFT}{ON|OFF}]                               controls presence/absence of axes.                                                                                                     SET BAR [SIZE] xxx    sets size of ends of error bars                                                                                       SET BOX [SIZE xxx [yy]]                                                                                                                     SET CARD [LENGTH] length   sets length of input cards.                                                                                      SET CIRCLE [SIZE xxx [yy]] (Same as SET ELLIPSE.)                                                                                           SET                                               COLOR               [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN|BLACK]                                                                                            SET DEVICE [device keyword] ['string'] [SIDEWAYS]                        [DDNAME=ddname]                                                       [INTERNAL | EXTERNAL]                                                 [SEQUENTIAL | INTERACTIVE]                                            [FANFOLD | CONTINUOUS]                                                  chooses output device.  (4013, Imagen,...)                                                                                             SET DIAMOND [SIZE xxx [yy]]                                                                                                                 SET ELLIPSE [SIZE xxx [yy]] (Same as SET CIRCLE.)                                                                                           SET FONT {BASIC|EXTENDED|DUPLEX}                                           chooses U.G. character set.                                                                                                            SET FORMAT 'format'                                                        format for TDMAIN card reader (usually '80A1').                                                                                        SET GRID{{OFF|HORIZONTAL|VERTICAL|ON|                                     SYMBOL [x][SIZE n]}                                                    specifies grid marks to overlay the plot.                                                                                              SET INTENSITY level                                                        sets line width or intensity for some devices.                                                                                                               - 26 -                                                                                                                                                                                                                                                            SET LABELS [SIZE=n]                                                          [{ALL|TOP|BOTTOM|RIGHT|LEFT}{ON|OFF}]                               controls numeric labels along axes.                                                                                                    SET LIMITS [X [FROM] xxx [TO] xxx]                                               [Y [FROM] yyy [TO] yyy]                                              [XMIN xxx] [XMAX xxx] [YMIN yyy] [YMAX yyy]                      sets limits for each plot axis.                                                                                                        SET ORDER [X [fctr]] [Y [fctr]] [DX|RX [fctr]]                                         [DY|RY [fctr]] [SYMBOL] [DUMMY]                           determines interpretation of input data cards.                                                                                         SET OUTLINE                                                                  [{ALL|TOP|BOTTOM|RIGHT|LEFT}{ON|OFF}]                               controls presence/absence of plot outine.                                                                                              SET PATTERN p1 s1 p2 s2 p3 ...                                             controls the pattern used in 'patterned' lines.                                                                                        SET SCALE {X|Y} [n1 [n2]]  [BASE n]                                        [LINEAR|LOGARITHMIC|MONTHS|YEARS|USER n|                                   NORMAL [MEAN x] [DEVIATION s] ]                                  sets scaling, number of labels, and ticks                                                                                              SET SIZE xxx [BY] yyy [UNITS=units] [REDUCE=reduce]                        defines active area of paper or screen.                                                                                                SET SYMBOL [x] [SIZE n]                                                    sets symbol used for plot character.                                                                                                   SET TEXTURE                                                               [SOLID|DOTS|DASHES|DOTDASH|PATTERNED]                                  sets line texture for all lines to be drawn                                                                                            SET TICKS [SIZE n]                                                           [{ALL|TOP|BOTTOM|RIGHT|LEFT}{ON|OFF}]                               controls tick marks on axes.                                                                                                           SET TITLE [SIZE n]    sets size for titles                                                                                                  SET WINDOW [X xxx [TO] xxx] [Y yyy [TO] yyy]                          SET WINDOW [X n1 OF n2] [Y n1 OF n2]                                       defines position of outline of current graph.                         (Labels are outside this window.  Titles and other                    graphs may be made inside or outside.)                                                                                                                                                                                                                                                                   - 27 -                                                                                                                                                                                                                                                       5.1   SET ARROW                                                                                                                                  SET ARROW [SIZE xxx] [{FLAIR|FLARE} fff]                                                                                               Set the size  and shape  of the   arrowhead  drawn   by  the               ARROW  command.    The default SIZE is 2.   The default               FLARE is 0.5.                                                                                                                          Examples:                                                                                                                                        SET ARROW FLARE 1 (wide arrowhead)                                    SET ARROW SIZE 1 FLARE 0.8                                                                                                                                                                                                                                                         5.2   SET AXES                                                                                                                                   SET {AXIS|AXES}                                                             [{ALL|TOP|BOTTOM|RIGHT|LEFT}{ON|OFF}]                                                                                            Controls the presence  or absence of each  axis,  which con-               sists of  the  outline, ticks,  and  labels.   The axes               are drawn at the first HIST, JOIN,  PLOT,  or PLOT AXES               command,  using  the axis parameters  in effect  at the               time.                                                                                                                                  OFF prevents drawing the outline,   labels,  and ticks.   ON               allows all  three:   the outline,   ticks   and  labels               may  or  may  not   be  drawn,   depending on  the  SET               OUTLINE, SET TICKS and SET LABELS commands.  (The book-               keeping  for SET  AXES and  for   these  latter   three               commands is kept  separately by Top Drawer.    Both the               axis and the individual element must be ON for the ele-               ment  to  be  drawn,   but changing one does not affect               the state of the other.)                                                                                                               The two forms,  SET AXIS and SET AXES,  exist only  for con-               venience.   They  are equivalent.                                                                                                      Examples:                                                                                                                                        SET AXES ALL OFF (no axes)                                            SET AXES ALL OFF BOTTOM ON (bottom only)                              SET AXES TOP OFF RIGHT OFF (left and bottom unaffected)                                                                                                                                                                                 - 28 -                                                                                                                                                                                                                                                       5.3   SET BAR                                                                                                                                    SET BAR [SIZE] xxx                                                                                                                     Set the size of the lines on the ends of the error bars.  As               in  the  SET  TICK SIZE  command,  the default value is               0.1, and the unit is inches.                                                                                                           Example:                                                                                                                                         SET BAR SIZE 0 (Just a line for the error bar, with no                                  cross bars at the ends of it.)                                                                                                                                                                                                                                   5.4   SET BOX                                                                                                                                    SET BOX [SIZE dx [dy]]                                                                                                                 Set the default values for the BOX half-widths.  See the BOX               command.                                                                                                                                                                                                                                                                           5.5   SET CARD                                                                                                                                   SET CARD [LENGTH] length                                                                                                               Sets the number of significant columns  for the input cards.               The default  value is 72.                                                                                                              Example:                                                                                                                                         SET CARD LENGTH 80 (Read 80 columns)                                                                                                                                                                                                                                               5.6   SET CIRCLE                                                                                                                                 SET CIRCLE [SIZE dx [dy]]                                                                                                              Set the  default values  for the  CIRCLE  and ELLIPSE  semi-               axes.  See the  ELLIPSE command.                                                                                                                                                                                                        - 29 -                                                                                                                                                                                                                                                       5.7   SET COLOR                                                                                                                                  SET COLOR [WHITE|RED|GREEN|BLUE|YELLOW|MAGENTA|CYAN|BLA                                                                                Select the color  for a device which will draw  in more than               one color.                                                                                                                             Three SLAC devices presently support color:   IBM 5080,  IBM               3179 terminals,  and Tektronix  4105 terminals.   Files               prepared for the latter can be  viewed on Mac II works-               tatsions using Versaterm.                                                                                                              Example:                                                                                                                                         SET COLOR RED                                                                                                                                                                                                                                                                      5.8   SET DEVICE                                                                                                                                 SET DEVICE [device keyword] ['string'] [SIDEWAYS]                        [DDNAME=ddname]                                                       [INTERNAL | EXTERNAL]                                                 [SEQUENTIAL | INTERACTIVE]                                            [FANFOLD | CONTINUOUS]                                                                                                                   keyword           Device                                                                                                                    IBM3179          IBM 3179 Color Graphics Terminal                     IBM5080          IBM 5080 Graphics Display Station                    IMAGEN            Any of the Imagen 300 printers.                     IMGN300           Same as Imagen.                                     TEKTRONIX         Tektronix 401x graphics terminal                    4013              Same as TEKTRONIX                                   4105              Tektronix 4105 graphics terminal                    VERSATEC          SLAC On-Line Versatec Plotter                                                                                        SET DEVICE  VERSATEC   may  be  followed  by   the  keywords               CONTINUOUS and/or EXTERNAL.                                                                                                            For TEKTRONIX or 4013 under VM/CMS,  the INTERACTIVE keyword               is used to send output to the terminal,  rather than to               a disk file.                                                                                                                           If a 'string' is given,  it is  passed as  the  argument  to               subroutine  UGOPEN, concatenated  at  the  end  of  the               argument  options   specified  by  the other  keywords.               See the U.G.   writeup (CGTM No.  203)   for details of               UGOPEN options.   Most  UGOPEN  options  are  available               through Top   Drawer keywords,   and this  parameter is               useful  mainly  for   new    or  experimental   graphic               devices.                                                                                                                                                          - 30 -                                                                                                                                                                                                                                                                                                                             SET DEVICE 4013 may  be followed by the  keyword SEQUENTIAL,               to specify the sequential dataset output format.                                                                                       DDNAME can be used to specify the ddname of the graphic out-               put dataset, on some IBM/U.G.  systems.   This would be               useful if you wanted to plot  on several devices in one               Top Drawer job.                                                                                                                        SIDEWAYS causes Top Drawer to treat the graphic device as if               it were rotated by 90 degrees.  For devices like Imagen               (with a drawing space 10 inches by 7.5 inches) this has               the illusion of  rendering plots in "portrait"  mode as               opposed to "landscape" mode.  There is at present, how-               ever,  a restriction in  TopDrawer which rescales plots               when they are  more than 7.5 inches  in height;  hence,               the SIDEWAYS doesn't let you use the full 10 inch draw-               ing space vertically.                                                                                                                  The default device,   and the default  parameters associated               with each device,  vary according to the operating sys-               tem and the devices available.  To be sure of a partic-               ular result,   you should specify  the device  and key-               words.                                                                                                                                                                                                                                                                             5.9   SET DIAMOND                                                                                                                                SET DIAMOND [SIZE dx [dy]]                                                                                                             Set the default values for the DIAMOND half-widths.  See the               DIAMOND command.                                                                                                                                                                                                                                                                   5.10   SET ELLIPSE                                                                                                                               SET ELLIPSE [SIZE dx [dy]]                                                                                                             Set the  default values  for the  CIRCLE  and ELLIPSE  semi-               axes.  See the  ELLIPSE command.                                                                                                                                                                                                        - 31 -                                                                                                                                                                                                                                                       5.11   SET FILE                                                                                                                             Top Drawer normally writes to Fortran  unit 6.   This may be               changed, for example to unit 3, by the command SET FILE               OUTPUT 3.   The  DEBUG and ERROR parts  of this command               allow different kinds of output to be routed to differ-               ent units.  They are not intended for general use.                                                                                     Top Drawer normally reads cards from  Fortran unit 5.   This               may be changed,   for instance to unit 12,  by the com-               mand SET FILE INPUT 12.                                                                                                                SET FILE can  cause execution errors  due to  missing units,               and it may cause printed output or garbage to appear in               the graphic output.                                                                                                                    Examples:                                                                                                                                        SET FILE INPUT 3 (Read from Fortran unit 3.)                          SET FILE OUTPUT 8 (Printed output to Fortran unit 8.)                                                                                                                                                                                                                              5.12   SET FONT                                                                                                                                  SET FONT {BASIC|EXTENDED|DUPLEX}                                                                                                       This command causes  the  Unified  Graphics  system  to load               the  appropriate character set.                                                                                                        The BASIC set is  missing many characters,  and  is probably               not useful.                                                                                                                            The EXTENDED set is the usual one,   and is  loaded  by  Top               Drawer  before  any graphic output is done.                                                                                            The  DUPLEX  set   is  the   most  complex,    and  provides               output  suitable   for publication.    It  is  also the               most expensive, in memory requirement,  computing time,               and volume of graphic output.   On  devices  which  use               dots instead of vectors,  and  which have only moderate               resolution,  the DUPLEX set may  not give good results.               On other devices, the drawing time may be prohibitive.                                                                                 Example:                                                                                                                                         SET FONT DUPLEX                                                                                                                                                                                                                                                                                               - 32 -                                                                                                                                                                                                                                                       5.13   SET FORMAT                                                                                                                                SET FORMAT 'format'                                                                                                                    Sets the  format used  by the  Fortran  READ  statement   in               reading input cards.  The default value is '(80A1)'.                                                                                   This command would  be useful  only if  an input  dataset is               defined  which contains  unit  records  longer than  80               characters.  It should be used  together  with  the SET               CARD LENGTH command, as in the following example.                                                                                      Some versions  of Top  Drawer,   such  as Top  Drawer  under               VM/CMS, do not use the standard Fortran input routines.               If this is the case, the SET FORMAT command may have no               effect.                                                                                                                                Example:                                                                                                                                         SET FORMAT '(133A1)'; SET CARD LENGTH 133                                                                                                                                                                                                                                          5.14   SET GRID                                                                                                                                  SET GRID {OFF|HORIZONTAL|VERTICAL|ON|SYMBOL [x]                               [SIZE n]}                                                                                                                      This command causes a grid to be  overlayed on the plot when               the axes are drawn.  The grid marks appear in line with               the large tick marks on each axis.                                                                                                     OFF inhibits the grid marks.    HORIZONTAL causes horizontal               lines  only  (joining  pairs   of   big  ticks  on  the               y-axes).   VERTICAL  causes vertical  lines only.    ON               causes both horizontal and vertical,  that is,  a  rec-               tangular  grid.   SYMBOL  x  causes  the  given  symbol               to be  plotted at the  vertices of a  rectangular grid,               and the grid lines to be omitted.   (The default symbol               is  0O,   a  plus,   which makes  the  plot look like a               NASA photograph.)   The SIZE parameter sets the size of               the grid symbols to be plotted.                                                                                                        SET GRID is not an action command,   because the grid is not               made until the  next PLOT,  HIST,   JOIN,   PLOT  AXES,               or BARGRAPH.   For this reason,  the grid can be called               for before the axes are defined,  but it  will  not  be               made until  the necessary   information  is  available.               SET GRID acts only on the current plot.   Only one grid               is made by  each SET GRID command.   A   new  SET  GRID               command  is  required  to  make  another grid,   and it               must follow a NEW FRAME or a SET WINDOW command.                                                                                                                  - 33 -                                                                                                                                                                                                                                                       Examples:                                                                                                                                        SET GRID ON                                                           SET GRID HORIZONTAL                                                   SET GRID SYMBOL                                                       SET GRID SYMBOL 1O SIZE 3                                                                                                                                                                                                                                                          5.15   SET INTENSITY                                                                                                                             SET INTENSITY level                                                                                                                    On some graphic output devices,  the plots can be made using               different levels  of brightness  or line  width.   This               command sets this level.  Line intensity can be changed               in mid-plot,   so plots  can contain  several different               intensities.                                                                                                                           Currently,  the  only device for  which this option  is sup-               ported is  the  Versatec model 1200 plotter.                                                                                           'level' depends  somewhat on the  graphics device  but typi-               cally is a number from 1 to 5.   For the  Versatec,  it               is an   integer,   and  decimal  fractions   are  trun-               cated.  The default intensity level is 2.                                                                                              Example:                                                                                                                                         SET INTENSITY 4 (very bright or wide lines)                                                                                                                                                                                                                                        5.16   SET LABELS                                                                                                                                SET LABELS [SIZE=n] [ON|OFF]                                                [{ALL|TOP|BOTTOM|RIGHT|LEFT} {ON|OFF}]                                                                                           Sets the size  of the  numeric labels  along the  axes,  and               specifies  which  axes are  to be labelled.   Character               size conventions are described in the section on "Plot-               ting Text".  The  default  size is 2.  The defaults are               ON for left and bottom, and OFF for top and right.  See               also SET AXES.                                                                                                                                                                                                                                                                                                - 34 -                                                                                                                                                                                                                                                       Examples:                                                                                                                                        SET LABEL SIZE 3 (Make bigger labels.)                                SET LABELS ALL OFF (Make no labels.)                                  SET LABELS ALL OFF TOP ON (Label the top only.)                                                                                                                                                                                                                                    5.17   SET LIMITS                                                                                                                                SET LIMITS [X [FROM] xxx [TO] xxx]                                          [Y [FROM] yyy [TO] yyy]                                               [XMIN xxx] [XMAX xxx] [YMIN yyy] [YMAX yyy]                                                                                      Override (or request)  the automatic  selection of plot lim-               its.  If no limits are given, all are set for automatic               selection.  With automatic  selection,  limits are  set               to 10% beyond the range of  input values,  at the first               PLOT,  PLOT AXES,  JOIN or  HIST command.   If some are               specified, the others are not changed.                                                                                                 The difference between limits may  have any  non-zero value.               XMIN   gives  the  value  at   the  left   edge of  the               x-axis, and XMAX gives the value at the right end,  but               there is  no requirement that  XMIN be less  than XMAX.               (And the use   of YMIN and YMAX is  of course similar.)               For instance,                                                                                                                               SET LIMITS X FROM 10 TO -10 Y FROM 0 TO -20                                                                                            is legal, and sets values from 10 at the left edge to -10 at               the  right,   and from zero at the bottom to -20 at the               top.                                                                                                                                   Examples:                                                                                                                                        SET LIMITS X FROM 0 TO 100                                            SET LIMITS XMIN 0 XMAX 100                                            SET LIMITS X 0 100 Y 100 150                                                                                                                                                                                                                                                                                  - 35 -                                                                                                                                                                                                                                                       5.18   SET ORDER                                                                                                                                 SET ORDER [X [fctr]] [Y [fctr]] [Z [fctr]]                                   [DX|RX [fctr]] [DY|RY [fctr]] [DZ|RZ [fctr]]                          [SYMBOL] [DUMMY]                                                                                                                Set the order in which the values  on each data card will be               interpreted.    The default   order  is  [X  Y   DX  DY               SYMBOL].   Each value is a number or a symbol.   Values               are separated by  blanks or some other  separator,   as               explained in  the section on Input Formats.                                                                                            X and Y are  coordinate values.   DX and  DY are half-widths               for the  error  bars used   in  the  PLOT command.   RX               and RY signify that the errors to be given are relative               to the central value.                                                                                                                  "fctr" are four multiplicative factors which will be applied               to  the  data  on each  input  card.    If  a factor is               not explicitly given, 1.0 is used.   Values from a pre-               vious SET ORDER card are not retained.                                                                                                 DUMMY signifies that the value at  that position on the card               is to be ignored.  You can specify multiple DUMMY posi-               tions.                                                                                                                                 SYMBOL is the  symbol which will be used to  PLOT the point.               (The default symbol is given  by the SYMBOL card.)   It               may  be specified  by a  single character   or  a  U.G.               extended-character- set  pair,  as for the  SYMBOL com-               mand.                                                                                                                                  For instance,                                                                                                                                    SET ORDER X DX Y DY SY                                                10 3 50 10 0O                                                                                                                          is equivalent to                                                                                                                                 SET ORDER X RX Y RY SYM                                               10 .3 50 .2 0O                                                                                                                         and to                                                                                                                                           SET ORDER X 10 RX Y DY 10 SYMBOL                                      1 .3 50 1 0O                                                                                                                           and to                                                                                                                                           SET ORDER X DUMMY DUMMY DX Y DY SYMBOL                                10 ABC 123 3 50 10 0O                                                                                                                  Note that the 0O under SYMBOL is a "zero" and the letter "O"                                                                                                           - 36 -                                                                                                                                                                                                                                                                                                                             5.19   SET OUTLINE                                                                                                                               SET OUTLINE                                                                  [{ALL|TOP|BOTTOM|RIGHT|LEFT} {ON|OFF}]                                                                                          Controls the presence/absence of the outline surrounding the               plot.  See also SET AXES.                                                                                                              Examples:                                                                                                                                        SET OUTLINE ALL OFF                                                   SET OUTLINE ALL OFF BOTTOM ON                                                                                                                                                                                                                                                      5.20   SET PATTERN                                                                                                                               SET PATTERN p1 s1 p2 s2 p3 ...                                                                                                         The 'pattern' set by  this command is used  in drawing 'pat-               terned' lines,  when enabled by a SET TEXTURE PATTERNED               command or a PATTERNED keyword in a JOIN,  HIST,  PLOT,               or BAR command.                                                                                                                        The first number gives a distance  (in inches as modified by               any REDUCE value)  to draw.   The second number gives a               distance to be skipped or left blank.   The third gives               a distance to draw, the fourth a distance to skip,  and               so forth.   When the list is exhausted, it starts again               with the first number.   (A zero skip is assumed at the               end if there is an odd number of numbers in the list.)                                                                                 Examples:                                                                                                                                    SET PATTERN .1 .1   gives dashed lines                                SET PATTERN .01 .09 gives dotted lines                                SET PATTERN .01 .04 gives dots with half the spacing                  SET PATTERN .1 .1 .01 .1 gives dot-dash                               SET PATTERN 0 .1 .1 gives dashes, starting with a blank                                                                                                                                                                                                                                                           - 37 -                                                                                                                                                                                                                                                       5.21   SET SCALE                                                                                                                                 SET SCALE {X|Y} [n1 [n2]] [BASE n]                                           [LINEAR|LOGARITHMIC|MONTHS|YEARS|USER n|                                 NORMAL [MEAN x] [DEVIATION s] ]                                                                                              Scaling for each axis is independent.  n1 and n2 specify the               type  and  spacing of  labels  and ticks.  If n1 and/or               n2 are  zero or  omitted,  TOP  DRAWER chooses  its own               value(s).  Control is different for each scaling mode.                                                                                 Linear:                                                                                                                                     There will be at most  (|n1|+1)  intervals (and |n1|+2 major               ticks) on the  axis.  (Since labels are placed at round               numbers,  which may not coincide  with the ends of  the               axis,  there   may  be   fewer.)    Each   interval  is               divided into |n2| subintervals by unlabelled ticks.                                                                                    Positive n1 gives big ticks at major intervals.  Positive n2               gives  big   ticks for  subintervals.   Negative  gives               small ticks.   The  default values are n1=6  and n2=-5,               which produces  approximately   6 intervals,  separated               by large labeled  ticks.   Each interval is  divided by               small ticks into 5 small intervals.                                                                                                    Setting n2=1 eliminates small ticks altogether.                                                                                             (To choose the linear axis markings,  Top  Drawer  lays  out               an  axis  with  n1 intervals  of size BASE*ROUND*POWER,               where BASE is given by the BASE parameter, ROUND is 1.,               2., 2.5, or 5.,  and POWER is an integral power of ten.               ROUND and  POWER are  chosen   for  the   minimum  axis               length which  is not  less than  the difference  of the               limits.    Normally   this  axis  is  longer   than  is               required,  and only the part within the limits is plot-               ted.    Under certain  circumstances,  it  is not  long               enough, and |n1|+1 intervals are used.)                                                                                                Logarithmic:                                                                                                                                Each decade is labelled the same.    n1 controls the labels.               If n1 is  positive, standard  notation,  e.g.  '10000',               is used for the labels.  If n1 is negative, exponential               notation,  e.g.  '10',  is used  at integral powers of               ten,  and only the first digit is used for any interme-               diate labels.  n2 controls ticks.   If n2 is  negative,               short ticks are used except  at integral powers of ten.               If n2 is positive, long ticks are used exclusively.  In               any case,  the magnitudes  of n1  and  n2 make bit pat-               terns which specify the positions of intermediate ticks               and labels, according to the following scheme:                                                                                              value              meaning                                                                                                                                        - 38 -                                                                                                                                                                                                                                                                                                                                    1         No intermediate labels (n1) or ticks (n2)                   2         Label or tick at all positions, 2 thru 9                   2**n       Label or tick at the n-th position                                                                                         (A sum may  be used to specify  more than one position  at a               time, except for  the values  1  and 2.  Thus, n2 = -36               specifies a small tick at 2 and 5, since 36 = 2 + 2.)                                                                                Months:                                                                                                                                     Labels are Jan, Feb, etc.   MONTHS specifies a special scale               which  is useful  for  plotting  functions of  calendar               date.    January 1  is  given   by  the   value   1.01.               (Technically,  this   is  noon   of  January   1.   The               entire day  is from  1.005 to  1.015.)   January  31 is               1.31.   February 1 is 2.01, and the scaling function is               arranged so that  1.315 is equivalent to  2.005,  since               midnight of January 31 is the same as "zero o'clock" of               February first.                                                                                                                        The axis  is labelled  by the  names  of the  months,  in  a               twelve-month cycle.  That is, 1, 13, 25, etc.   are all               labeled 'Jan'.   Every fourth  February,  starting with               month 38, has 29 days,  although for most purposes this               will not be noticeable.   Values less than zero are not               allowed,  and values greater than  1000 may be affected               by round-off  errors.   No  year titles  are generated,               although they could be put in with a TITLE command.                                                                                    The n1 parameter, as usual,  controls the labels,  which are               put at month 1 (January)   and every |n1| months there-               after.   n1>0  signifies that  the labels  are to  have               three letters each  (Jan Feb Mar etc.)   and n1<0 calls               for one letter each (J F M etc.).                                                                                                      Years:                                                                                                                                      Values can be given by year and Julian day.  YEARS specifies               a special scale which is  useful for plotting functions               of a calendar date.   For instance, January 1, 1976, is               given by 76.001,  or 1976.001.    (The former method is               preferred,   to avoid  round-off  errors.)  76.3655  is               equivalent to 77.005.                                                                                                                                                                                                                                                                                         - 39 -                                                                                                                                                                                                                                                       Base n:                                                                                                                                     For log scaling, labels and large ticks are put at powers of               the base.   BASE 2,  for instance,  would put labels at               0.5, 1, 2, 4, 8, etc.                                                                                                                  For linear scaling,   this is useful for  non-decimal units,               such  as time  (BASE 12)   or  angle (BASE  90 or  BASE               3.14159).                                                                                                                              Examples:                                                                                                                                      SET SCALE X LINEAR BASE 12 (Time scale)                               SET SCALE X LOG Y LOG                                                 SET SCALE X 13 1 (For limits from 0 to 13, this gives a                        tick and label at every integer)                             SET SCALE X 13 -2 (The same, but with an unlabelled                      small tick between each pair of large ones.)                       SET SCALE X LOG BASE 2 (Label at .5,1,2,4,8,...)                      SET SCALE X MONTHS                                                                                                                                                                                                                                                                   5.22   SET SIZE                                                                                                                                SET SIZE xxx [BY] yyy [UNITS units] [REDUCE reduce]                                                                                      The SIZE  of a  plot  measures the  area  of  the paper  (or               screen,  or film)  in which plotting can be done.   The               UNITS and REDUCE parameters,   together,  determine the               physical length of the units involved.                                                                                                 First,  take the case where REDUCE = 1.0.   UNITS then meas-               ures the  number of  plot units which  will fit  in one               inch.   If UNITS = 1.0, which is the default value, xxx               and yyy are  measured in inches,  and  all positions in               the TEXT coordinate system are also in inches.                                                                                         If REDUCE = 1.0 and UNITS =  2.54,  then positions are meas-               ured in centimeters.   Remember that all sizes, such as               for titles,  ticks,  and arrows,  are still measured in               tenths of an inch.  A title size of 2 gives title spac-               ing of 0.508 cm, which is the same as 0.2 inches.                                                                                      If the UNITS parameter and the xxx by yyy size are kept con-               stant,  the REDUCE  parameter is a factor  by which all               elements of the  plot are reduced.   This  is different               from the  units parameter because  it affects  sizes as               well as positions.  Thus the command SET SIZE 10 BY 7.5               REDUCE 2 will reduce a  plot to half-size,  whereas SET               SIZE 10 BY  7.5 UNITS 2 will reduce  the overall dimen-               sions, but leave the titles disproportionately large.                                                                                                             - 40 -                                                                                                                                                                                                                                                                                                                             There is  one further  complication.  The  minimum value  of               REDUCE is that which just  allows the entire plot,  xxx               by yyy units, to fit on the graphic device in use.  Top               Drawer will  adjust it if too  small a value  is given.               The  following  table  gives the  minimum  and  default               REDUCE values. The minimum reduce value in any case can               be  calculated by  knowing that  the true  size of  the               plot,  in inches,  is the given size value (xxx or yyy)               divided by (UNITS*REDUCE). This true size must be small               enough to fit on the device in question.                                                                                               Examples:                                                                                                                                        SET SIZE 10 BY 7.5 REDUCE 2 (Everything half-size.)                   SET SIZE 33 BY 25 UNITS 2.54 (Measure in centimeters.)                                                                                                                                                                                                                             5.22.1   Device Size Parameters                                                                                                                                         Maximum      Minimum  Default                    Device            Size (inches)    REDUCE  REDUCE                                                                                           Imagen 8/300        10.0 by 7.5     1.00   1.00                       Fan-fold Versatec   10.5 by 7.88    1.27   1.27                       Continuous Vers.    ---  by 10.0    1.00   1.00                       4013 terminal        8.0 by 6.1     1.65   1.65                       4105 terminal        9.5 by 7.0     1.05   1.05                       IBM 3179 terminal    9.5 by 7.0     1.12   1.12                       IBM 5080            11.2 by 11.2    0.89   1.00                                                                                                                                                                                                                                  5.23   SET STORAGE                                                                                                                               SET STORAGE [X] [Y] [DX] [DY] [SYMBOL]                                                                                                 The Top  Drawer point  buffer is  about  5120 numbers  long,               which  gives  room  for 1024  points  of  five  numbers               (x,y,dx,dy,symbol)  each.   If you  want more points to               fit,  you may  use the SET STORAGE  command to redefine               the numbers allocated to each point.   For instance, if               your  points have  no error  bars,  you  could use  SET               STORAGE X Y SYMBOL,  and there would be room for 5120/3               = 1706 points.                                                                                                                         SET STORAGE  destroys  the  current contents  of  the  point               buffer.   SET ORDER (q.v.) will invoke a SET STORAGE if               it contains  a variable which  is not allocated  in the                                                                                                           - 41 -                                                                                                                                                                                                                                                            currently defined  storage.   (So,  for  instance,  SET               ORDER X Y  Z redefines each point as  having values for               X, Y, Z, DX, DY and SYMBOL,  and there is room for only               5120/6 = 853 points.)                                                                                                                                                                                                                                                              5.24   SET SYMBOL                                                                                                                                SYMBOL [x] [SIZE n]                                                                                                                         SET SYMBOL [x] [SIZE n]                                                                                                                The symbol 'x' becomes  the default symbol  to   be  PLOTted               for  the  following points.   This card does not affect               the plotting of points already read in--the SYMBOL card               must preceed the  data cards for the points  it  is  to               affect.   As explained for the  SET ORDER command,  the               symbol may be set for each data point, overriding  this               default symbol.    The symbol may  be specified  by one               character followed   by a blank   or   by   a   charac-               ter   pair   from    the U.G.   extended-character-set.               The  latter   two  are  useful for  specifying plotting               characters, as described in Appendix A.                                                                                                The default symbol  is a  blank or  no character,   which is               plotted  as  a  dot  if zero  error bars are specified.               If 'SIZE n' is specified, n is the approximate width of               the plotted  character,  in  tenths of  an inch.    The               default size is 2.0.                                                                                                                   The best symbols  to use  are the plot  symbols (0O  to 9O),               (note again  that this is "zero"  "O" as in  the letter               "O")  for which  the  center of  the  symbol  is  plot-               ted  at the specified point.   This is not true of many               other symbols, such as the period,  which are not plot-               ted in the center  of the area they control.                                                                                           The two  forms   of  the  command,   'SYMBOL...'   and  'SET               SYMBOL...'  exist  only   for  convenience.   They  are               equivalent.                                                                                                                            Examples:                                                                                                                                        SET SYMBOL SIZE 4 (Big plot symbols)                                  SET SYMBOL 3O (Plot symbol is a square)                                                                                                                                                                                                                                                                       - 42 -                                                                                                                                                                                                                                                       5.25   SET TEXTURE                                                                                                                               SET TEXTURE                                                              [SOLID|DOTS|DASHES|DOTDASH|PATTERNED]                                                                                               Set the texture of  all  lines   to  be  drawn subsequently,               including  ticks, outlines,  histograms,  and the error               bars plotted by  the PLOT command and  by the automatic               PLOT  command.   It  does  not  affect titles  or  axis               labels.   A texture parameter in the  PLOT, JOIN,  etc.               commands overrides the value set  by this command,  for               that action only.                                                                                                                      PATTERNED textures must be used  in conjunction with the SET               PATTERN command (q.v.).                                                                                                                Example:                                                                                                                                         SET TEXTURE DOTDASH                                                                                                                                                                                                                                                                5.26   SET TICKS                                                                                                                                 SET TICKS [SIZE n] [ON|OFF]                                                 [{ALL|TOP|BOTTOM|RIGHT|LEFT} {ON|OFF}]                                                                                           This command controls the presence of  the tick marks on the               axes,  and sets   the length  of the  (smaller)  ticks.               The  larger ticks  are three  times the  length of  the               smaller.    The value  specified  is  in inches.    The               default size is 0.1.                                                                                                                   Examples:                                                                                                                                     SET TICKS TOP OFF RIGHT OFF (Ticks on bottom and left.)               SET TICKS OFF BOTTOM ON (Allows ticks on bottom only.)                                                                                                                                                                                                                                                           - 43 -                                                                                                                                                                                                                                                       5.27   SET TITLE                                                                                                                                 SET TITLE [SIZE n]                                                                                                                     Set the default size for titles.   (The default size for the               'TOP' title is  1.5 times  this  value.)   The  default               value is  2.   See the  section on "Plotting  Text" for               more information about title sizes and character gener-               ation.                                                                                                                                 Example:                                                                                                                                         SET TITLE SIZE 4.5                                                                                                                                                                                                                                                                 5.28   SET WINDOW                                                                                                                                SET WINDOW [X xxx [TO] xxx] [Y yyy [TO] yyy]                                                                                                SET WINDOW [X n1 OF n2] [Y n1 OF n2]                                                                                                   SET WINDOW sets the coordinates,  in inches,  of the axes of               the  coming  graph.  (The available plotting surface is               set by the SET SIZE command.)   More than one area  may               be used before making a NEW FRAME.   If neither X nor Y               is specified,   the values are  reset to  the original,               nearly full-size,  values.   If  only one is specified,               the other  is not  changed.   When   one  or   both  is               specified,    the corresponding  limits  are reset  for               automatic selection.   They may of course be reset by a               SET LIMITS command.                                                                                                                    The alternate form, using the OF keyword, divides the  x- or               y-axis  into  n2 sections,  and  sets the window values               to fit within the n1-th  section (reading left to right               or bottom to  top).    The   default  title  and  label               sizes are  adjusted accordingly,  although they  may of               course be set explicitly.   As usual,  a border is left               on each side, to leave some room for the titles.   Non-               integral n1 and/or  n2 may be used  for fine adjustment               to the window position and border size.                                                                                                Examples:                                                                                                                                        SET WINDOW X FROM 1 TO 4 Y FROM 1 TO 4 (Bottom left)                  SET WINDOW X 6 12 (Right side of screen)                              SET WINDOW X 3 of 3 Y 1 OF 2 (Divides the screen/paper                       3 across and 2 high, and sets the current                             window at the bottom right.)                                                                                                                                                                                                                                                                           - 44 -                                                                                                                                                                                                                                                                                                                                                      Section 6                                                                                                                   TDPREVU--A PC SPECIFIC TOPDRAW INCARNATION                                                                                         TDPreVu  is yet  another  incarnation  of TopDraw--this  one               written specifically to take advantage of the more mod-               ern  hardware platform  and interfaces  of the  desktop               workstation --in this case the PC.  The purpose of this               section is to describe TDPreVu, its facilities,  how it               differs from TopDraw,  where it will  run and how to do               so.                                                                                                                                                                                                          6.1   WHAT IS A TDPREVU?                                                                                                                    TDPreVu is an entirely new version  of Top Drawer written in               Pascal with very different design  goals from the main-               frame version.   It exploits the interactive facilities               available on the IBM  PC--while maintaining compatibil-               ity with existing Top Draw files.                                                                                                      This implementation takes the form of an integrated environ-               ment, an environment where one is encouraged to iterate               back and  forth between  editing the  TD file  with the               TDPreVu  integrated editor  and  viewing the  resulting               graph  until the  "right" picture  has been  generated.               Once that  "right" view is  obtained,  you can  print a               copy,  landscape or portrait,   on the locally attached               dot matrix or laser printer.   In this environment when               TDPreVu finds an error, it will invoke the editor, with               the cursor positioned at the token in question and with               an error message at the bottom of the screen.                                                                                          This iterative approach  is not limited  to a  single graph.               TDPreVu treats a TopDraw file  with multiple plots as a               stack of graphs  which can be manipulated  by using the               cursor control  keys:   'Home'  takes you  back to  the               first graph in the stack,  'End'  takes you to the last               plot in the file,  and 'PgUp' and 'PgDn' move you up or               down in the stack by one graph, respectively.                                                                                          This stack of graphs,  and their generating top drawer file,               are "bound." This  means that if one wants  to review a               previously drawn  graph whose generating data  have not               been changed, then the plot is redrawn from the graph's               metacode definition,   saved when the graph  was origi-                                                                                                           - 45 -                                                                                                                                                                                                                                                            nally rendered,  with significantly faster performance.               If,  on the  other hand,  the generating  text has been               changed,   the plot and its  metacode are rendered from               scratch.                                                                                                                               One of the  distinguishing features between a  mainframe and               desktop computer  is the ability  to provide  real time               keystroke  sensitivity  and less  than  10  millisecond               trivial response times.  For TDPreVu this means you can               hit 'PgDn'  twice in rapid  succession and have  the PC               immediately start drawing  the graph two plots  "up" in               the stack.    One can  also invoke  the editor  while a               graph is  being drawn  (e.g.,  as soon  as an  error is               noted)   without waiting  until the  plot is  complete.               This is accomplished by striking 'E'.   The source file               is automatically positioned at the first line and first               character of the text that generated the plot.                                                                                         Top Draw over  the years has  supported myriads  of devices,               often with  very differently  sized drawing  areas.  In               order  to maintain  compatibility  with these  devices,               TDPreVu treats all  "SET SIZE" sizes as  virtual (i.e.,               you can  define the drawing  surface to be  any desired               size and  TDPreVu will  map that  domain into  the full               physical size of the PC screen.                                                                                                        Minor caveat: for version 0 only--TDPreVu is a 98% subset of               Top Draw--Join  Smooth and  Spline are  not yet  imple-               mented nor are user defined line patterns. Version 1.00               will include this functionality.                                                                                                                                                                                                                                                   6.2   TDPREVU HARDWARE REQUIREMENTS                                                                                                         TDPreVu will  run on  almost any  PC or  true clone  with at               least 512k  of memory,   any of  four popular  graphics               cards,  and a hard disk.   The graphics cards supported               are VGA,  AT&T 6300,  EGA  and CGA.  Hercules cards are               supported for display, but not for local printing.  Now               that TDPreVu  has more generalized color  support,  and               more  supported colors,   a  color  monitor is  clearly               advantageous.                                                                                                                                                                                                                                                                                                 - 46 -                                                                                                                                                                                                                                                       6.3   RUNNING TDPREVU                                                                                                                       To install  TDPreVu,  one  must  create  a directory  called               TDPREVU  and  copy  into   it  the  files  TDPREVU.EXE,               TDPREVU.HLP,  and TDPREVU.TDF.   (At SLAC,  these files               may be down-loaded from the PERCOM2 disk.)  This direc-               tory must also be in the  PATH in order for the command               to find the HELP and font files.                                                                                                       TDPreVu  can invoked  for two  different  purposes:  1)   to               produce a one  page help/intro or 2)  to  process a Top               Draw file and produce plots.   To generate the one page               intro screen use the command                                                                                                             TDPREVU ?                                                                                                                                 To invoke TDPreVu to process a Top Draw file, use                                                                                             TDPREVU  fn  [prefixing.command.list]                                                                                                     where "fn" is the file name of  the Top Draw file to be pro-               cessed and where  the prefixing command list  is a list               of commands,  separated by semicolons,   that are to be               inserted at  the head  of the working  copy of  the Top               Draw  file.  If  fn is  specified  without an  explicit               extension, ".TD" is assumed. One may use of fully qual-               ified file names; in the absence of full qualification,               TDPreVu will search the current  directory and then the               PATH.  If fn is specified as  a file mask as opposed to               an explicit file name,  all matching files will be pro-               cessed in the order found. If no file is found, TDPreVu               will invoke  its editor directly  so that the  user can               create a file with that name.                                                                                                          If the file  exists,  TDPreVu will  compile the file  into a               metacode on a frame by  frame basis,  display the first               frame of the  file,  and wait for a  keystroke from the               user. Keystrokes have the following meaning:                                                                                           KeyStroke      Interpretation                                         ---------     ------------------------                                <esc>         Quit the current file and present the exit                            menu.                                                                                                                          E            Edit the current file at the current graph                            location.                                                                                                                      H            Present a scrollable copy of the TopDrawer                            Manual (CGTM 178)                                                                                                              P            Print on the local printer a copy of the                              current graph display.                                                                                                         Q            Toggles the upper-right corner status display                                                                                                            - 47 -                                                                                                                                                                                                                                                                     between showing a "?" when waiting and                                showing the amount of free storage.                                                                                           <Home>        For multiplot Top Draw files: make the first                          plot of the file the current file.                                                                                            <End>         For multiplot files: make the last plot the                           file the current file.                                                                                                        <PgUp>        Make the previous plot in the file the c                              current plot.                                                                                                                 <PgDn>        Make the next plot the current plot.                     ?            Produces a one page quick reminder of                                 keystroke interpretation.                                                                                                     While TDPreVu is processing a Top Draw file, but has not yet               started to display any generated metacode,  it displays               an  indicator flag  in the  right upper  corner of  the               screen.  The flags have the following meaning:                                                                                           ? -- Awaiting new user keystroke.                                     ^ -- Loading Top Draw file text from disk.                            * -- Compiling metacode from Top Draw text.                                                                                               If TDPreVU detects an  error while translating the  Top Draw               text into its metacode counterpart,  it will abort fur-               ther translation,  display an error message and await a               user keystroke.  If the user at this point strikes 'E',               the editor is invoked with the cursor under the offend-               ing token.                                                                                                                             If the user enters a meaningful keystroke during compilation               of the  text into metacode  or during the  drawing pro-               cess,  processing  is interrupted and the  keystroke is               serviced.                                                                                                                              The exit menu,  reached by entering an <esc> from either the               editor or  the main  graph display,   is provided  as a               quick  way to  "reinvoke" TDPreVu  against another  Top               Draw file without returning to DOS.                                                                                                                                                                                                                                                                           - 48 -                                                                                                                                                                                                                                                       6.4   USING THE TDPREVU INTEGRATED EDITOR                                                                                                   To facilitate  the  iterative process  of  refining  graphs,               TDPreVu has an integrated editor.   The editor allows a               user to extend existing files, start new ones,  correct               TDPreVu detected errors in the current file,  etc.  The               editor is in  the style of WordStar,   i.e.,  keystroke               driven rather than command driven.  It supports most of               the WordStar  keystrokes and has  a number  of specific               limitations like  80 character  line length  and 20,000               line maximum file size. In the context of TDPreVu, how-               ever, it is adequate for most interactive "alterations"               needed for grooming a plot.  If  you need to make major               changes  to a  TopDrawer file  you  may want  to use  a               "real" editor and reserve the  TDPreVu editor for minor               editorial changes.                                                                                                                     TDPreVu error messages are visible in the editor at the bot-               tom of the  main graph screen and  remain visible until               the first keystroke of the editing session.  When error               conditions are  encountered,  the cursor  is positioned               under the  first character  of the  token that  TDPreVu               found to be in error.                                                                                                                                                                                                                                                                                         - 49 -                                                                                                                                                                                                                                                       KeyStroke      Interpretation                                         ---------     ----------------                                         Esc          Have  TDPreVu quit  processing the  current fi                        and present the user with the TDPreVu exit men                        If the  current file had been  modified since                         was last saved, the user  will be prompted as                         whether the  modified file should be  saved ba                        to disk.                                                                                                                       F3           Have  TDPreVu  leave  the   editor  and  try                          process/re-graph the  current graph. If  the T                        Draw  text   defining  the  graph   hasn't  be                        changed, then the graph  will be quickly redra                        from the prior drawing's  saved metacode. If t                        text has  been modified, then the  new text wi                        be processed, a new metacode produced and draw                                                                                 ?            Presents a terse one page Editor Help screen.                                                                                  Home         Will move the cursor to  column 1 of the curre                        line.                                                                                                                          End          Will position  the cursor immediately  after t                        last character of the current line.                                                                                            PgUp         Will reposition the screen one screen's worth            -or-         line (23 in  this case) higher in  the file. T           F7           top of the screen  can not be positioned "abov                        the beginning of the file.                                                                                                     PgDn         Will  reposition the  screen  down one  screen           -or-         worth of lines. The top of the screen can not            F8           positioned "below" the last line of the file.                                                                                  UpArrow      Will move  the cursor up  1 line. If  the curs                        was already on  the top text line  of the scre                        and that line  isn't the first line  of the fi                        then the screen will  be scrolled down one lin                        Like PgUp, the screen can not be repositioned                         "above" the top of the file.                                                                                                   DownArrow    Will move the cursor down  1 line. If the curs                        was already on the last  text line of the scre                        and that is  not the last line of  the file, t                        screen will be scrolled up one line.                                                                                           LeftArrow    Moves the cursor left  one column. Moving to t                        left of column one is not permitted.                                                                                           RightArrow   Moves the cursor right one column. Moving to t                        right of column 80 (at least in this version)                         not supported.                                                                                                                 Del          If the  cursor is  within the  text of the lin                                                                                                           - 50 -                                                                                                                                                                                                                                                                     then the  character (or blank) above  the curs                        will  be deleted  and  any following  characte                        moved left one column.                                                                                                         Ins          Toggles the editor's Insert vs. Overwrite stat                        The current state is  displayed at the bottom                         the edit window. Insert  vs. OverWrite alter t                        interpretation of a <cr>.                                                                                                      <cr>         If the editor is in Insert mode (the default),                        new line will be  inserted immediately after t                        current line. Any text above and to the right                         the cursor in the original line will be moved                         the new  line. The cursor will  be positioned                         column one of the new  line. If the editor is                         OverWrite mode,  then the cursor will  simply                         moved to column one of  the next line. In eith                        case, if the cursor was  on the last line of t                        screen, then screen will  be scrolled upward o                        line to make room for new cursor position.                                                                                     Backspace    If the cursor is within the text of the line a                        to  the right  of  column 1,  then BackSpace                          simply a Delete of the  character to the left                         the cursor. If the cursor is in column one, th                        that line  is deleted and its  contents append                        to  the  end  of  the  preceding  line.  If  t                        resulting  line  would  be  longer  the  curre                        editor maximum line length,  then the request                         ignored. A BackSpace from column one of line o                        is also ignored.                                                                                                               characters   Other  (permitted) keystrokes  are added  to t                        current line above the  cursor. If the editor                         in Insert  mode (the default) then  any existi                        characters to the right  of the cursor are mov                        right  one  column,  making  room  for  the  n                        character. If the line  is already full, the n                        character is ignored and  the bell is sounded                         a warning.  If the editor is  in OverWrite mod                        then the  character above the cursor  is repla                        with the new character.                                                                                                                                                                                                        - 51 -                                                                                                                                                                                                                                                       6.5   LANGUAGE DIFFERENCES BETWEEN TOP DRAWER AND TDPREVU                                                                                   As noted above,   TDPreVu version  0 is  an interim  version               which implements only a subset  of the functions avail-               able in TopDrawer  on mainframes.  Version 1,   when it               becomes available,  will implement the full functional-               ity of the mainframe programs.                                                                                                         The limitations of version 0 are:                                                                                                           --User specified line drawing patterns are not yet                      implemented (though some effort is made to fake the                   result).                                                                                                                                  --Log scales, either x or y, will generate different major              tick intervals then expected.                                                                                                             --SMOOTH and SPLINE on JOIN not yet implemented.                                                                                            TDPreVu differs from Top Drawer in  the way it maps pictures               onto the available drawing space.  Through the SET SIZE               command with  its REDUCE parameter,  Top  Drawer allows               some versatility for controlling the size of plots,  at               least over a range of possibilities. Since TDPreVu maps               the plot onto the full drawing  space of the PC screen,               the SET  SIZE command  merely functions  to adjust  the               units used in defining the plot.                                                                                                       TDPreVu expands the  color capabilities in a  number of dif-               ferent ways from color use  in Top Drawer:  more colors               are allowed,   color fill is available,   and different               areas within the plot (BORDER, BACKGROUND, OUTLINE) can               be assigned colors.  The SET COLOR command itself works               a  little differently  also--in  mainframe Top  Drawer,               data points were bound to their  color when the PLOT or               HISTOGRAM command was issued;   in TDPreVu,  points and               color are bound at the time the point is entered.   For               example,                                                                                                                                 SET COLOR RED                                                         1.0 1.2; 2.0 1.7                                                      SET COLOR BLUE                                                        3.0 2.3; 3.0 2.5                                                      PLOT                                                                                                                                      will product  four blue  points  with  mainframe Top  Drawer               since BLUE was the color in effect at the time PLOT was               issued.   TDPreVu, on the other hand produces,  two red               points and two blue points.                                                                                                            The SET COLOR command  has been expanded so  that colors may               be assigned to the different areas of the plot as indi-               cated below:                                                                                                                                                      - 52 -                                                                                                                                                                                                                                                                                                                               SET COLOR <color1> [OUTLINE <color2>] [BACKGROUND <color3>                      [BORDER <color4>]                                                                                                               where OUTLINE signifies the axes  of the plot including tick               marks, BACKGROUND is the color field within the OUTLINE               where data points are plotted,   and BORDER is the pic-               ture frame surrounding the plot where titles and labels               generally  appear.   In  addition to  the eight  colors               available in mainframe Top Drawer (WHITE,  RED,  GREEN,               BLUE, YELLOW, MAGENTA, CYAN,  BLACK),  TDPreVu provides               eight more in the lighter tones: GRAY, LTGRAY, LTGREEN,               LTBLUE, LTCYAN, LTRED, LTMAGENTA, and BROWN.                                                                                           TDPreVu takes advantage of the color potentials of an IBM PC               through the  notion of a COLOR  SET.  A COLOR SET  is a               particular collection of colors for points, BACKGROUND,               OUTLINE,  and BORDER which can be referred to by a sin-               gle color in the COLOR SET  command.   COLOR SET RED is               shorthand for the following SET COLOR command:                                                                                           SET COLOR BLACK OUTLINE LTGREEN BORDER LTRED BACKGROUND RE                                                                                The table below lists the available COLOR SETs.   Other com-               binations may  be obtained through  the SET  COLOR com-               mand,  and  we are receptive to  aesthetically pleasing               candidates for inclusion as additional COLOR SETs.   It               should be noted that the name of a COLOR SET is derived               from the BACKGROUND color. The format for the COLOR SET               command is:                                                                                                                              COLOR SET  <name>                                                                                                                         where <name> is one of the COLOR SET names listed below.                                                                                    ColorSet    ---------   C o l o r s  ---------                          Name       Drawing  Background  Border     Outline                  ----------------------------------------------------                   BLACK       RED      BLACK       LTGRAY     LTGREEN                   BLUE        YELLOW   BLUE        BLUE       WHITE                     GREEN       BLACK    GREEN       MAGENTA    BLACK                     RED         BLACK    RED         BLUE       BLACK                     CYAN        BLACK    CYAN        BLUE       LTRED                     MAGENTA     BLACK    MAGENTA     LTMAGENTA  BLACK                     BROWN       LTGREEN  BROWN       LTMAGENTA  BLACK                     GRAY        BLACK    GRAY        WHITE      BLACK                     LTGRAY      BLACK    LTGRAY      GRAY       WHITE                     LTBLUE      YELLOW   LTBLUE      GREEN      WHITE                     LTGREEN     BLACK    LTGREEN     GRAY       BLACK                     LTRED       BLACK    LTRED       RED        BLACK                     LTCYAN      BLACK    LTCYAN      BLUE       BLACK                     LTMAGENTA   BLACK    LTMAGENTA   MAGENTA    BLACK                     YELLOW      BLACK    YELLOW      BROWN      BLACK                     WHITE       BLACK    WHITE       GRAY       BLACK                                                                                                                     - 53 -                                                                                                                                                                                                                                                        MONO        WHITE    BLACK       WHITE      WHITE                     INV         BLACK    WHITE       BLACK      BLACK                                                                                          Top Drawer has CIRCLEs,  ELLIPSEs and  a few other geometric               primitives. TDPreVu adds an additional primitive called               POLYGON.  POLYGON  allows one  to draw  regular n-sided               polygons centered at a specific location in either text               or data  coordinate systems,   optionally rotated  by a               specified  number of  degrees.   POLYGONs  may also  be               "filled" with the currently specified color.   The for-               mat for the POLYGON command is                                                                                                           POLYGON <n> <x> <y> [DATA] <r> [FILL] [OFFSET <t>]                                                                                        where <n> is  number of sides on the polygon  (3 through 360               are supported). <x> and <y> are the coordinates for the               center of the polygon.  If DATA is specified,  then <x>               and <y> will be DATA coordinate system based, otherwise               they are taken to be in the TEXT coordinate system. <r>               is the radius  of the polygon to be drawn.   If FILL is               specified,  the  POLYGON will be  filled with  the cur-               rently active color from the most recent SET COLOR com-               mand.  <t>  is the number of  degrees counter-clockwise               that the  polygon is to  be rotated.  By  default,  the               polygon is drawn with a vertex  at the "3 O'Clock posi-               tion.                                                                                                                                  TDPreVu supports two varieties of  EPSON printers and the HP               LaserJet-1 printer.    The PRINTER  command is  used to               specify to TDPreVu which type of printer is attached to               your PC for producing local screen dumps. The format of               the PRINTER command is:                                                                                                                  PRINTER   [FX | LQ | LJ]  [PORTRAIT | LANDSCAPE]                                [ONCE | TWICE]                                                                                                                  FX and LQ are  used to specify either EPSON FX  or LQ series               printers to TDPreVu.  LJ is used to specify a HP Laser-               Jet-1.  If PORTRAIT is  specified,  any locally printed               screen dumps will  be printed as seen on  the screen on               the printer. If LANDSCAPE is specified, the screen dis-               play will be rotated 90 degrees clockwise before print-               ing.   TWICE specifies, for dot-matrix printers, double               striking each  point of  the plot  for added  contrast.               ONCE is used to reset this mode.  The defaults are "FX,               PORTRAIT and ONCE".                                                                                                                                                                                                                                                                                           - 54 -                                                                                                                                                                                                                                                                                                                                                      Appendix A                                                                                                                      THE UNIFIED GRAPHICS CHARACTER SET                                                                                                                                                                   The U.G.  System Expanded and  Duplex character sets include               upper and lower case Roman and Greek letters, many spe-               cial characters, and any number of  levels  of sub-  or               superscripts.     Many characters  are  specified by  a               character pair,  as  explained in the section  on TITLE               and CASE strings.                                                                                                                                                                                                                     This plot is in                                                       the SAMPLE file on                                                    the Top Drawer tape.                                                                                                                                                                                                                                                                      - 55 -                                                                                                                                                                                                                                                                                                                             Some  typewriters   can   make  some   special   characters,               without  requiring  a character  pair.   In  this case,               the special character can be used.  If a CASE string is               used also, then the second character of the pair should               be  a blank.   For instance, the 'left bracket' charac-               ter '[' can be given by a  character pair '[  '  or  by               a  character pair  '(S'.   Similarly,   the lower  case               alphabet can  be given  by lower  case characters,   if               they  are   available  on   the terminal   or keypunch,               or  they   can  be   given by  the corresponding  upper               case characters, paired with the CASE character 'L'.                                                                                   Below is an example using TITLE and CASE commands along with               the plot produced by Top Drawer.                                                                                                       SET SIZE 10 BY 7.5 REDUCE 2                                           SET FONT DUPLEX                                                       SET TITLE SIZE 2.4                                                    TITLE 1 6'UC Roman A B C D E F G H I J K L M N O P '                  MORE 'Q R S T U V W X Y Z'                                            TITLE 'LC Roman A B C D E F G H I J K L M N O P '                     CASE  '         L L L L L L L L L L L L L L L L '                     MORE 'Q R S T U V W X Y Z'                                            CASE 'L L L L L L L L L L'                                            TITLE 'Keyboard C T . ( + | & ! $ * ) ; " - / , % _'                  CASE  '         S S                                '                  TITLE 'Keyboard > U  .  # @ '' = "   0 1 2 3 4 5 6 7 8 9'             CASE  '           P  P                                  '             TITLE 'UC Greek A B C D E F G H I K L M N O P '                       MORE  'Q R S T U W X Y Z'                                             CASE  '         F F F F F F F F F F F F F F F '                       CASE  'F F F F F F F F F'                                             TITLE 'LC Greek A B C D E F G H I K L M N O P '                       MORE 'Q R S T U W X Y Z'                                              CASE  '         G G G G G G G G G G G G G G G '                       CASE 'G G G G G G G G G'                                              TITLE 'Math Sym A B C D E G H I J L M N P R S T X Y Z'                CASE  '         M M M M M M M M M M M M M M M M M M M'                TITLE 'More Math 0 2 + - * / = . ( ) A E F G I K L M N U'             CASE  '          M M M M M M M M M M T T T T T T T T T T'             TITLE 'Plot Sym 0 1 2 3 4 5 6 7 8 9'                                  CASE  '         O O O O O O O O O O'                                  TITLE 'Special   I U D L R B D F B E ( ) L R P H L D U O /'           CASE  '          P W W W W W P P S S S S S S P K K M D D S'                                                                                                                                                                                                                                                        - 56 -                                                                                                                                                                                                                                                                                This plot is from                                                     the above input.                                                                                                                                                                                                                                                                          - 57 -                                                                                                                                                                                                                                                            Char    Character               Char    Character                     Pair   Description              Pair   Description                                                                                           A    U.C. A                     AL   L.C. A                           B    U.C. B                     BL   L.C. B                           C    U.C. C                     CL   L.C. C                           D    U.C. D                     DL   L.C. D                           E    U.C. E                     EL   L.C. E                           F    U.C. F                     FL   L.C. F                           G    U.C. G                     GL   L.C. G                           H    U.C. H                     HL   L.C. H                           I    U.C. I                     IL   L.C. I                           J    U.C. J                     JL   L.C. J                           K    U.C. K                     KL   L.C. K                           L    U.C. L                     LL   L.C. L                           M    U.C. M                     ML   L.C. M                           N    U.C. N                     NL   L.C. N                           O    U.C. O                     OL   L.C. O                           P    U.C. P                     PL   L.C. P                           Q    U.C. Q                     QL   L.C. Q                           R    U.C. R                     RL   L.C. R                           S    U.C. S                     SL   L.C. S                           T    U.C. T                     TL   L.C. T                           U    U.C. U                     UL   L.C. U                           V    U.C. V                     VL   L.C. V                           W    U.C. W                     WL   L.C. W                           X    U.C. X                     XL   L.C. X                           Y    U.C. Y                     YL   L.C. Y                           Z    U.C. Z                     ZL   L.C. Z                                                                                                            Other Keyboard Characters                                                                                                             Blank                      >    Greater Than                     ^    Cent Sign                  ?    Question Mark                    .    Period                     :    Colon                            <    Less Than                  #    Pound Sign                       (    Left Parenthesis           @    At Sign                          +    Plus Sign                  '    Apostrophe                       |    Vertical Line              =    Equals Sign                      &    Ampersand                  "    Quote Marks                      !    Exclamation Mark                                                 $    Dollar Sign                0    Numeral 0                        *    Asterisk                   1    Numeral 1                        )    Right Parenthesis          2    Numeral 2                        ;    Semi-Colon                 3    Numeral 3                            Not                        4    Numeral 4                        -    Minus Sign                 5    Numeral 5                        /    Slash Mark                 6    Numeral 6                        ,    Comma                      7    Numeral 7                        %    Percent                    8    Numeral 8                        _    Underline                  9    Numeral 9                                                                                                                                                                                                                                                               - 58 -                                                                                                                                                                                                                                                                                                                                  Char    Character               Char    Character                     Pair   Description              Pair   Description                                                                                           Upper Case Greek                Lower Case Greek                                                                                            AF   U.C. Alpha                 AG   L.C. Alpha                       BF   U.C. Beta                  BG   L.C. Beta                        CF   U.C. Chi                   CG   L.C. Chi                         DF   U.C. Delta                 DG   L.C. Delta                       EF   U.C. Epsilon               EG   L.C. Epsilon                     FF   U.C. Phi                   FG   L.C. Phi                         GF   U.C. Gamma                 GG   L.C. Gamma                       HF   U.C. Eta                   HG   L.C. Eta                         IF   U.C. Iota                  IG   L.C. Iota                        KF   U.C. Kappa                 KG   L.C. Kappa                       LF   U.C. Lambda                LG   L.C. Lambda                      MF   U.C. Mu                    MG   L.C. Mu                          NF   U.C. Nu                    NG   L.C. Nu                          OF   U.C. Omicron               OG   L.C. Omicron                     PF   U.C. Pi                    PG   L.C. Pi                          QF   U.C. Theta                 QG   L.C. Theta                       RF   U.C. Rho                   RG   L.C. Rho                         SF   U.C. Sigma                 SG   L.C. Sigma                       TF   U.C. Tau                   TG   L.C. Tau                         UF   U.C. Upsilon               UG   L.C. Upsilon                     WF   U.C. Omega                 WG   L.C. Omega                       XF   U.C. Xi                    XG   L.C. Xi                          YF   U.C. Psi                   YG   L.C. Psi                         ZF   U.C. Zeta                  ZG   L.C. Zeta                                                                                              Subscripts and Superscripts     Blanks of Various Widt                                                                                      0X   Enter Subscr Mode           U   Null                             1X   Leave Subscr Mode          0U   Backwards Blank                  2X   Enter Superscr Mode        1U   Extra Half Blank                 3X   Leave Superscr Mode        2U   Half Back Blank                                                  3U   Extra Third Blank                Size Changes                    4U   Third Back Blank                                                 5U   Extra Sixth Blank                0Y   Increase Size              6U   Sixth Back Blank                 1Y   Decrease Size                                                                                    1V   Half Up                          Position Save/Restore           2V   Half Down                                                        3V   Third Up                         0Z   Save Position-1            4V   Third Down                       1Z   Restore Pos-1              5V   Sixth Up                         2Z   Save Position-2            6V   Sixth Down                       3Z   Restore Pos-2                                                    4Z   Save Position-3                                                  5Z   Restore Pos-3                                                                                                                                                                                                                                                                                           - 59 -                                                                                                                                                                                                                                                                                                                                  Char    Character               Char    Character                     Pair   Description              Pair   Description                                                                                               Mathematical Symbols            Plot Symbols                                                                                            IM   Integral Sign              0O   Plot Sym V Cross                 XM   Times Sign                 1O   Plot Sym D Cross                 /M   Division Sign              2O   Plot Sym Diamond                 AM   Approximately Equal        3O   Plot Sym Square                  YM   Partial Derivative         4O   Plot Sym F Diamon                ZM   Del                        5O   Plot Sym F Square                JM   Line Integral              6O   Plot Sym F V Cros                PM   Group Plus                 7O   Plot Sym F D Cros                *M   Group Multiply             8O   Plot Sym Star                    RM   Proportional to            9O   Plot Sym Octagon                 +M   Plus or Minus                                                    2M   Square Root                    Other Special Symb                MM   Less or Equal                                                    HM   Greater or Equal           IP   Interbang                        NM   Not Equal                  UW   Up Arrow                         0M   Infinity                   DW   Down Arrow                                                       LW   Left Arrow                          More Mathematical Symbols    RW   Right Arrow                                                      BW   Left/Right Arrow                 MT   Membership Symbol          DP   Dagger                           NT   Membership Negation        FP   Double Dagger                    ET   Existential Quant.         BS   Left Angle Bracke                IT   Intersection               ES   Right Angle brack                AT   Universal Quant.           (S   Left Bracket                     UT   Union                      )S   Right Bracket                    LT   Contained in               LS   Left Brace                       GT   Contains                   RS   Right Brace                      KT   Contained in/Equal         PP   New Paragraph                    FT   Contains/Equal             HK   H-Bar                                                            LK   Lambda-Bar                                                       DM   Degrees                                                          UD   Underscore                                                       OD   Overscore                                                        /S   Backwards Slash                                                                                                                                                                                   - 60 -                                                                                                                                                                                                                                                                                                                                                        INDEX                                                                                                            { ... 10                        CIRCLE ... 11, 13, 31                                                 clear                                 abbreviation ... 3                 screen ... 8                       ACTION                          COLOR ... 9                              commands ... 10              COLOR SET ... 53                      Akima, Hiroshi ... 16           COLOR SET definitions ... 53          algorithm ... 16                columns ... 29                        ALIAS ... 11, 16                comments ... 3                        ALL ... 26-28, 34, 37           conflicting                           ANGLE ... 11, 17-18, 40            keywords ... 3                     APL ... 1                       CONTINUOUS ... 26, 30                 apostrophes ... 17              control                               arithmetic ... 1                   commands ... 24                    ARROW ... 9, 11-12              coordinate                            AXIS ... 9                         system ... 6                          labels ... 27                coordinate system ... 6                                               CRT ... 2                             BACKGROUND, in SET COLOR for    cusps ... 16                             TDPreVu ... 52                                                     BAR                             DASHES ... 11-12, 14-15, 27,             SIZE ... 9                      43                                 BARGRAPH ... 10-12              data ... 6-7, 15, 17-18               BASE ... 27, 38-39                 Commands ... 19                    BASIC ... 26, 32                   coordinate                         Beach, Robert ... 2                   system ... 12-14                BIN ... 10, 20, 25                 fitting ... 1                      BINS ... 20, 22                    points ... 20                      BORDER, in SET COLOR for        DATA system ... see                      TDPreVu ... 52                  "coordinate system"                BOTTOM ... 6, 11, 17, 26-28,    DDNAME ... 26, 30                        34, 37, 43                   decade ... 38                         BOX ... 11                      DIAMOND ... 9, 11, 13                    SIZE ... 9                   discontinuity ... 16                  Braces ... 10                   DOTDASH ... 11-12, 14-15,             Brackets ... 10                    27, 43                             brightness ... 34               DOTS ... 11-12, 14-15, 27,                                               43                                 calendar ... 7, 39              DUMMY ... 27, 36                      CARD                            DUMP ... 24                              LENGTH ... 9                 DUPLEX ... 7, 26, 32                  CASE ... 11, 17, 55-56          DX ... 20, 22                         CENTER ... 11, 17-18            DY ... 20, 22                         centimeters ... 40                                                    character                       e to the i pi ... 19                     set ... 7, 32, 54            Electrostatic                            spacing ... 7, 18               Plotter ... See Versatec                                                                                                            - 61 -                                                                                                                                                                                                                                                       ELLIPSE ... 9, 11, 14, 31       Julian ... 39                         END ... 24                                                            English ... 2                   Keyboard ... 56                       Error                                                                    bars ... 15-16, 20           labels ... 27-28, 38                  exponential ... 38              LANDSCAPE (TDPreVu) ... 54               notation ... 3               Lawton, Anthony ... 16                EXTENDED ... 26, 32             LEFT ... 6, 11, 17, 26-28,            EXTERNAL ... 26, 30                34, 37, 43                                                         legal                                 FANFOLD ... 26, 30                 input ... 3                        fatness ... 12                  LESS ... 11-12                        Field                           level ... 15, 21                         separators ... 3             limits ... 16                         FILE ... 32                     line                                  FLAGS ... 24, 27                   segments ... 15                    FLAIR ... See Flare                texture ... 27                     FLARE ... 9, 11-12, 28             width ... 34                       FONT ... 8-9                    linear ... 7, 21, 27, 38              FORMAT ... 9                    LIST ... 24                           Fortran                         logarithmic ... 7, 27, 38                unit ... 31                  Lower                                 FREQUENCY ... 21                   case ... 10, 19, 55                function                                                                 evaluation ... 1             math symbol ... 56                    FUNNY ... 11, 15                MODE ... 8                                                            months ... 27, 38-39                  GENERAL ... 11, 15              MORE ... 11, 17                       Greek ... 19, 55-56             multiple                              GRID ... 9                         commands ... 3                                                                                           HISTOGRAM ... 10-11, 14, 21     NASA ... 33                           HORIZONTAL ... 26, 33           NEW                                                                      FRAME ... 7-8, 10-11, 16,          IBM                                   44                                 3179 ... 30                  NODEBUG ... 27                           5080 ... 30                  non-decimal ... 40                    IBM PC ... 44                   normal ... 27, 38                     Imagen ... 2, 30                   distribution ... 21                inches ... 7, 40, 43-44         NOTRACE ... 27                        INDEX ... 11, 17-18             numeric                               input                              labels ... 34                         format ... 3                                                       INTENSITY ... 9                 OF ... 27, 44                         interactive ... 26, 30          OFF ... 26-28                         INTERNAL ... 26, 30             ON ... 26-28, 33                      interpretation of               ORDER ... 9                              input ... 27                 OUTLINE ... 9, 27-28                  isosceles                       OUTLINE, in SET COLOR for                triangle ... 12                 TDPreVu ... 52                                                     Output ... 2                          } ... 10                                                                                              pair ... 36                           JOIN ... 10-11, 15              paper clip ... 4                                                                                                                       - 62 -                                                                                                                                                                                                                                                       PATTERN ... 11-12, 14-15,       SET                                      27, 37, 43                      ARROW ... 12, 26-27                PC Version ... 45                  AXES ... 28                        permanence ... 8                   AXIS ... 26, 28                    PLOT ... 10-11, 16                 BAR ... 26, 28                        AXES ... 11, 16                 BOX ... 26, 29                        character ... 27                CARD ... 26, 29                       symbols ... 42                  CIRCLE ... 26, 29                  plot symbol ... 56                 COLOR ... 26, 29                   plotter ... See Versatec,          Commands ... 25                       Tektronix, etc.                 DEVICE ... 2, 6-8, 26, 30          point buffer ... 41                DIAMOND ... 14, 26, 31             POINTS ... 11, 22                  ELLIPSE ... 14, 26, 31             POLYGON (TDPreVu) ... 54           FONT ... 26, 32                    PORTRAIT (TDPreVu) ... 54          FORMAT ... 26, 32                  POWER ... 38                       GRID ... 8, 26, 33                 PRINTER command                    INTENSITY ... 26, 34                  (TDPreVu) ... 54                LABELS ... 26, 28, 34              Printers, PC, in                   LIMITS ... 7, 18, 27, 35,             TDPreVu ... 54                     44                              probability ... See "normal"       ORDER ... 20, 27, 35, 41           publication ... 32                 OUTLINE ... 27-28, 37                                                 PATTERN ... 27                     quotes ... 17                      SCALE ... 7, 21, 27, 37                                               SIZE ... 6, 27, 40, 44             random                             STORAGE ... 41                        access ... 4                    SYMBOL ... 27, 42                  RBC ... 16                         TEXTURE ... 12, 14, 27,            rectangle ... 13                      42                              REDUCE ... 9, 27, 40-41            TICKS ... 27-28, 43                reduction ... 7                    TITLE ... 27, 43                   REXX ... 2                         WINDOW ... 6-8, 27, 44             RIGHT ... 6, 11, 17, 26-28,     SET COLOR in TDPreVu ... 52              34, 37, 43                   sideways ... 26, 30-31                Roman ... 19, 55-56             SIZE ... 9                            ROUND ... 38                    SMOOTH ... 10, 20-21, 25              round numbers ... 38            SOLID ... 11-12, 14-15, 27,                                              43                                 Scale                           SPACES ... 11, 17-18                     factors ... 36               spacing between                       scaling ... 27, 38                 characters ... 7                      function ... 39              Speakeasy ... 1                       semi-axis ... 29, 31            SPLINE ... 11, 15                     semicolon ... 3                 standard deviation ... 21             separator ... 20                subscript ... 56                      SEQUENTIAL ... 26, 30-31        superscript ... 19, 55                                                SYMBOL ... 26-27, 33, 36                                                                                                                    TDMAIN ... 26                                                         TDPreVu ... 44                                                        TDPreVu color                                                            extensions ... 52                                                  TDPreVu COLOR SET                                                        concept ... 53                                                                                                                      - 63 -                                                                                                                                                                                                                                                       TDPreVu COLOR SET               user ... 27, 38                          definitions ... 53                                                 TDPreVu Editor keystroke        Versatec ... 2, 30, 34                   conventions ... 49           VERTICAL ... 26, 33                   TDPreVu Error                   VM/CMS ... 33                            Detection ... 48                                                   TDPreVu hardware                weight ... 21                            requirements ... 46          window ... 6-7, 9                     TDPreVu HELP                    WORLD system ... see                     invocation ... 47               "coordinate system"                TDPreVu integrated                                                       editor ... 48                X ... 20, 22                          TDPreVu keystroke               XDATA ... 11, 17-18                      conventions ... 47           Xedit ... 2                           TDPreVu language                XMAX ... 27, 35                          differences ... 51           XMIN ... 27, 35                       TDPreVu PC printer                                                       support ... 54               Y ... 20, 22                          TDPreVu POLYGON language        YDATA ... 11, 17-18                      extension ... 54             years ... 27, 38-39                   TDPreVu PRINTER                 YMAX ... 27, 35                          command ... 54               YMIN ... 27, 35                       TDPreVu SET COLOR command                                                extensions ... 52            [ ... 10                              TDPreVu SET SIZE                                                         conventions ... 52           401x ... See Tektronix                TDPreVu, running on IBM         4013 ... 30                              PC ... 46                    4105 ... 30                           Tektronix ... 2, 30                                                      4105 ... 30                  ] ... 10                              TEXT ... see also                                                        "coordinate system", 6,                                               11, 15, 17                                                            coordinate                                                               system ... 12-14, 40                                            text-editing ... 2                                                    TEXTURE ... 9, 15                                                     tick                                                                     marks ... 27                                                       TICKS ... 9, 27-28, 38, 43                                            time ... 40                                                           TITLE ... 7, 10-11, 17-18,                                               55-56                                                                 SIZE ... 9                                                         TOP ... 6, 11, 17, 26-28,                                                34, 37, 43-44                                                      TRACE ... 27                                                                                                                                U.G. ... 2, 19, 26, 30, 36,                                              42, 55                                                             UGOPEN ... 30                                                         UNITS ... 27, 40                                                      Upper                                                                    case ... 10, 55                                                                                                                                                     - 64 -                                                                                                                                                                                                                                                                                                                                                       CONTENTS                                                                                                                                                                                Section                                                 page                                                                                1.  INTRODUCTION  . . . . . . . . . . . . . . . . . . . .  1                                                                                       Output . . . . . . . . . . . . . . . . . . . . . .  2                 Input  . . . . . . . . . . . . . . . . . . . . . .  2                    Input Formats . . . . . . . . . . . . . . . . .  3                 About This Note  . . . . . . . . . . . . . . . . .  4                 The Anatomy of a Plot  . . . . . . . . . . . . . .  5                 Coordinate Systems . . . . . . . . . . . . . . . .  6                    The TEXT Coordinate System  . . . . . . . . . .  6                    The Window  . . . . . . . . . . . . . . . . . .  6                    The DATA Coordinate System  . . . . . . . . . .  7                 Plotting Text  . . . . . . . . . . . . . . . . . .  7                    Character Size  . . . . . . . . . . . . . . . .  7                 Default Values . . . . . . . . . . . . . . . . . .  8                 Commands . . . . . . . . . . . . . . . . . . . . . 10                                                                                2.  ACTION COMMANDS . . . . . . . . . . . . . . . . . . . 11                                                                                       ARROW  . . . . . . . . . . . . . . . . . . . . . . 12                 BARGRAPH . . . . . . . . . . . . . . . . . . . . . 12                 BOX  . . . . . . . . . . . . . . . . . . . . . . . 13                 CIRCLE . . . . . . . . . . . . . . . . . . . . . . 13                 DIAMOND  . . . . . . . . . . . . . . . . . . . . . 13                 ELLIPSE  . . . . . . . . . . . . . . . . . . . . . 14                 HISTOGRAM  . . . . . . . . . . . . . . . . . . . . 14                 JOIN . . . . . . . . . . . . . . . . . . . . . . . 15                    The Join Algorithm  . . . . . . . . . . . . . . 16                 NEW FRAME  . . . . . . . . . . . . . . . . . . . . 16                 PLOT . . . . . . . . . . . . . . . . . . . . . . . 16                 PLOT AXES  . . . . . . . . . . . . . . . . . . . . 17                 TITLE, CASE, and MORE  . . . . . . . . . . . . . . 17                                                                                3.  DATA COMMANDS . . . . . . . . . . . . . . . . . . . . 20                                                                                       List of Data Commands  . . . . . . . . . . . . . . 20                 Data Points  . . . . . . . . . . . . . . . . . . . 20                 BIN  . . . . . . . . . . . . . . . . . . . . . . . 21                 FREQUENCY  . . . . . . . . . . . . . . . . . . . . 21                 SMOOTH . . . . . . . . . . . . . . . . . . . . . . 21                    The Smoothing Algorithm . . . . . . . . . . . . 22                 X/Y BINS/POINTS  . . . . . . . . . . . . . . . . . 22                                                                                                                                                                                - iii -                                                                                                                                                                                                                                                       4.  CONTROL COMMANDS  . . . . . . . . . . . . . . . . . . 24                                                                                       DUMP . . . . . . . . . . . . . . . . . . . . . . . 24                 END  . . . . . . . . . . . . . . . . . . . . . . . 24                 LIST . . . . . . . . . . . . . . . . . . . . . . . 25                                                                                5.  SET COMMANDS  . . . . . . . . . . . . . . . . . . . . 26                                                                                       SET ARROW  . . . . . . . . . . . . . . . . . . . . 28                 SET AXES . . . . . . . . . . . . . . . . . . . . . 28                 SET BAR  . . . . . . . . . . . . . . . . . . . . . 29                 SET BOX  . . . . . . . . . . . . . . . . . . . . . 29                 SET CARD . . . . . . . . . . . . . . . . . . . . . 29                 SET CIRCLE . . . . . . . . . . . . . . . . . . . . 29                 SET COLOR  . . . . . . . . . . . . . . . . . . . . 30                 SET DEVICE . . . . . . . . . . . . . . . . . . . . 30                 SET DIAMOND  . . . . . . . . . . . . . . . . . . . 31                 SET ELLIPSE  . . . . . . . . . . . . . . . . . . . 31                 SET FILE . . . . . . . . . . . . . . . . . . . . . 32                 SET FONT . . . . . . . . . . . . . . . . . . . . . 32                 SET FORMAT . . . . . . . . . . . . . . . . . . . . 33                 SET GRID . . . . . . . . . . . . . . . . . . . . . 33                 SET INTENSITY  . . . . . . . . . . . . . . . . . . 34                 SET LABELS . . . . . . . . . . . . . . . . . . . . 34                 SET LIMITS . . . . . . . . . . . . . . . . . . . . 35                 SET ORDER  . . . . . . . . . . . . . . . . . . . . 36                 SET OUTLINE  . . . . . . . . . . . . . . . . . . . 37                 SET PATTERN  . . . . . . . . . . . . . . . . . . . 37                 SET SCALE  . . . . . . . . . . . . . . . . . . . . 38                 SET SIZE . . . . . . . . . . . . . . . . . . . . . 40                    Device Size Parameters  . . . . . . . . . . . . 41                 SET STORAGE  . . . . . . . . . . . . . . . . . . . 41                 SET SYMBOL . . . . . . . . . . . . . . . . . . . . 42                 SET TEXTURE  . . . . . . . . . . . . . . . . . . . 43                 SET TICKS  . . . . . . . . . . . . . . . . . . . . 43                 SET TITLE  . . . . . . . . . . . . . . . . . . . . 44                 SET WINDOW . . . . . . . . . . . . . . . . . . . . 44                                                                                6.  TDPREVU--A PC SPECIFIC TOPDRAW INCARNATION  . . . . . 45                                                                                       What is a TDPreVu? . . . . . . . . . . . . . . . . 45                 TDPreVu Hardware Requirements  . . . . . . . . . . 46                 Running TDPreVu  . . . . . . . . . . . . . . . . . 47                 Using the TDPreVu Integrated Editor  . . . . . . . 49                 Language Differences Between Top Drawer and                                 TDPreVu  . . . . . . . . . . . . . . . . . . 52                                                                                Appendix                                                page                                                                                A.  THE UNIFIED GRAPHICS CHARACTER SET  . . . . . . . . . 55                                                                                INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . 61                                                                                                           - iv -                           2ZÅ▒▐∩N|⌐╨9nÑ█Jä¼┌KaêÜ╬5fƒ╧>qƒ┘Cv»µGÇ┤µ!	Q	o	¬	┌	
O
ä
£
╨
┘
M{▒∞'bùLALL   CLOLMLPLILLLALTLILOLNLS R A WS)   OLWLNLELR = W B J3$a)îL8ñ)L8)î$IzS-a╪<)Çaah8=══L┬±$a)îÇ8ñ)Ç8)î╟q╪<år@y╕vêaÇ   ¿8{¼1ä √	a ¿1Qü╥a'TOTAL COMPILATIONS'AW) OWNER=WBJ'år33δ)a┌<åAaår33δ)a┌<åAaüyPòAau<ô<ô ΣÆTOTAL COMPILATIONS LLLL  LLLLLLLL LLLL  LLLLLLLLLLLüü½`ä]âüü½`ä]â═╠╠╠ Qü╔╔y╬╔yLLLL  LLLLLLLLLLL                  ' LLLL  LLLLLLLLLLL╟w»╡L D°LES;»DPVDEV;D