











                                         

                                 REDWOOD DRAW (TM)
                                    Version 2.01

                                                                                   
                                         
                     Copyright (C) 1991-1994 Redwood Technology
                                All rights reserved
                                         



                                         
                                Redwood Technology
                                3824 Vineyard Drive
                              Redwood City, CA 94061
                                        USA  
                                         
























                                        


                                      CONTENTS

           INTRODUCTION...............................................1

           1.  INSTALLATION...........................................3

           2.  OVERVIEW...............................................4

               LEARNING REDWOOD DRAW..................................4
               ADD GRAPHICS TO YOUR QBASIC PROGRAM....................6
               COORDINATE SYSTEMS.....................................7
               COMMAND FORMAT.........................................8
               COMMAND SYNTAX.........................................9
               COMMAND LINE ARGUMENTS................................10
               CHANGING DEFAULTS.....................................10

           3.  ACTION COMMANDS.......................................11

               ARROW.................................................11
               BARGRAPH..............................................11
               BIN...................................................12
               BOX...................................................12
               CASE..................................................13
               CIRCLE................................................13
               DIAMOND...............................................13
               ELLIPSE...............................................14
               FIT...................................................14
               HISTOGRAM.............................................15
               INCLUDE...............................................15
               IMPORT................................................15
               JOIN..................................................16
               LINE..................................................16
               MORE..................................................16
               NEW...................................................17
               PAUSE.................................................17
               PIECHART..............................................17
               PLOT..................................................17
               RECT..................................................18
               SMOOTH................................................18
               TITLE.................................................18
               TRIANGLE..............................................20

           4.  SET COMMANDS..........................................21

               SET ARROW.............................................21
               SET AXES..............................................21
               SET BACKCOLOR.........................................21
               SET BAR...............................................22
               SET BARGRAPH..........................................22
               SET BOX...............................................22
               SET CIRCLE............................................22
               SET COLOR.............................................22
               SET DIAMOND...........................................23
               SET ELLIPSE...........................................23


                                         i

               SET GRID..............................................23
               SET HPV...............................................23
               SET LABELS............................................24
               SET LIMITS............................................24
               SET LINESTYLE.........................................25
               SET LOG...............................................25
               SET ORDER.............................................25
               SET OUTLINE...........................................26
               SET PIEMODE...........................................26
               SET SCALE.............................................27
               SET SYMBOL............................................28
               SET TEXTURE...........................................28
               SET TICKS.............................................28
               SET TITLE.............................................29
               SET WINDOW............................................29

           5.  RWCONFIG.SYS AND DEFAULTS.............................30

           6.  HARD COPY AND OUTPUT FILES............................31

           7.  CHARACTER SET.........................................35

           8.  INDEX ................................................39































                                        ii


       ============
       INTRODUCTION
       ============

       Welcome to REDWOOD DRAW, a script-based graphics interpreter that:

         * Makes charts, plots, or other depictions of numerical
           data in unlimited formats

         * Easily adds graphics to your program in QBASIC, etc.

         * Presents on-screen slide shows and cycling shows

         * Makes text slides or briefing charts

         * Produces hard copy on laser and dot matrix printers

         * Fits and smooths data

         * Prepares PCX and TIFF files for desktop publishing

       The input or command file can be made with any ASCII editor or it can
       be generated by a program that you write.  You can also call REDWOOD
       DRAW directly from a program you write, in e.g. QBASIC, to easily add
       graphics.  The simplest command file contains a pair of numbers forming
       a single data point.  REDWOOD DRAW will place that single point in a
       data window and automatically label the axes.  More data points and
       various commands can be added to make plots of unlimited types and of
       publication quality.  Curves are drawn for arbitrary X and Y values so
       even multi-valued curves are possible.

       The format was derived from TOPDRAW, a graphics interpreter developed
       at the Stanford Linear Accelerator Center and  used on main frame
       computers in many high-energy physics laboratories.  However, REDWOOD
       DRAW runs on IBM PC's and 100% compatibles having an EGA or VGA
       graphics system with at least 256 KB of RAM on the graphics card and
       with 220 KB of available RAM in the computer memory.  There are many
       enhancements including new geometrical features, pie charts, multi-
       family bar charts, and the use of include files to combine standard
       format files with various data files.  Special characters are available
       including math symbols and the Greek and Cyrillic alphabets.  REDWOOD
       DRAW plots many TOPDRAW files with no changes.

       Special list-processing features simplify the plotting of data from
       standard tests or from daily business results.  Simple command files
       can control routine generation of graphs with very little operator
       intervention.

       ____________________________________________________________
       IBM is a registered trademark of International Business Machines
       Corporation.  All other brands and product names are trademarks or
       registered trademarks of their respective holders.



                                         1

       REDWOOD DRAW is a shareware product and may be freely distributed if
       none of the files on the distribution diskette have been deleted or
       modified.  If you test the product and decide to use it then please pay
       $19.00 using the form, RWORDER.FRM, provided.  Registered users will
       be notified of upgrades and new REDWOOD products.  Your suggestions for
       improvements are appreciated.




                                WARNING

       THIS SOFTWARE AND MANUAL ARE BOTH PROTECTED BY U.S. COPYRIGHT LAW
       (TITLE 17 UNITED STATES CODE). UNAUTHORIZED REPRODUCTION AND/OR SALES
       MAY RESULT IN IMPRISONMENT OF UP TO ONE YEAR AND FINES OF UP TO $10,000
       (17 USC 506). COPYRIGHT INFRINGERS MAY ALSO BE SUBJECT TO CIVIL
       LIABILITY.







































                                         2

       ================
       1.  INSTALLATION
       ================

       It is wise to generate a working copy of the distribution diskette to
       protect the executable files and to maintain the example input files
       which can be used as templates for your  plots.  Use the DOS commands
       DISKCOPY or XCOPY to make the working copy.

       REDWOOD DRAW can be run from a floppy diskette or it can be installed
       on a hard disk system.  For example, if the hard disk is C: make a new
       directory off the root with the DOS command:

            MD C:\RW  <Enter>

       Shift to the new directory:

            CD C:\RW  <Enter>

       Insert the working copy of the diskette in floppy drive A: and copy all
       files to the hard disk with:

            COPY A:*.*  <Enter>


































                                         3

       ============
       2.  OVERVIEW
       ============
       _____________________
       LEARNING REDWOOD DRAW

       Examples of the types of plots that can be made with REDWOOD DRAW are
       provided by a slide show copied to the RW directory during the
       installation.  To see the plots just respond to the DOS prompt with:

            RW DEMO.LST  <Enter>

       Each slide is plotted and remains on the screen until the space bar is
       pressed.  The name of each input file appears at the lower left corner
       of the screen.  Later, inspect an input file by using an ordinary
       editor or word processor or by using the DOS commands TYPE or PRINT.

       Use these demonstration files as templates or starting points to
       produce plots in a related format for your personal application.  In
       order to preserve the original examples, work only with a copy of the
       distribution diskette, and furnish to others only an unaltered copy of
       that diskette.

       Simple plots can be made by passing an ASCII file containing only data
       points to REDWOOD DRAW.  For example, use any editor (such as EDIT of
       MS-DOS) to generate a file called TEST.PLT containing the following
       lines:

            1 22
            9 28.7
            23.9 50.78
            37.2  53.01

       Each line contains a pair of numbers representing the X and Y
       coordinates of a data point.

       Invoke REDWOOD DRAW with this command file by typing

            RW TEST.PLT  <Enter>

       at the DOS prompt.  The program can be stopped by pressing <Control C>
       or <Control Break>.

       It is also possible to start RW with no input file on the DOS command
       line, i.e.

            RW  <Enter>

       Then the initial screen shows the version number and other information
       and prompts for an input file.  Specify it with:

            TEST.PLT  <Enter>





                                         4

       In either case the result is a plot of the four data points connected
       by a smooth curve.  The plot remains on the screen until the space bar
       or an alphanumeric key is pressed.

       Additional features are created by including simple commands in the
       input file.  For example, set rounded limits for the axes and make
       titles by inserting the following lines anywhere in the TEST.PLT file:

            set limits  x from 0 to 40  y from 20 to 60
            title bottom "Time (seconds)"
            title left "Output (Volts)"

       Running REDWOOD DRAW with the revised input file shows the additional
       features.

       Most commands are rather intuitive and easily remembered.  Explanations
       are given in the following pages, but some of the terms are best
       illustrated by running another slide show copied from the RW diskette.
       Type

            RW TUTOR.LST  <Enter>

       After viewing the tutorial list, experiment with a file selected from
       either the DEMO.LST or the TUTOR.LST.  Protect the original by copying
       it to a work file called MY.PLT.  Then use an editor to change some
       parameters or titles and check the results by answering the DOS prompt
       with

            RW MY.PLT  <Enter>

       It would probably not be useful at this time to continue with a
       detailed reading of the chapters on ACTION COMMANDS and SET COMMANDS.
       Instead skim the table of contents and the index to gain an overview of
       the available features.

       Experience will suggest the commands most important for your
       applications.  It will often be helpful to copy a file from the
       DEMO.LST and modify it to fit your data.

       A command file can contain three types of statements: data statements,
       set commands, and action commands.

       Data statements must begin with a number and must contain at least the
       X and Y coordinates of a point.  Error estimates, plot symbols, and
       dummy or unused parameters may also be included on the data line.  The
       SET ORDER command, explained on page 25, facilitates selecting the
       desired values.

       Successive data are read and stored in an internal buffer which holds
       up to 1025 points.  After data have been input you can display the
       points with the PLOT command or connect them by a smooth curve with the
       JOIN command.  If data in the buffer have been processed with an action
       command such as PLOT or JOIN and another data statement is found in the
       input file then the buffer is emptied or reset before the new data are



                                         5

       stored.  This provides a natural method to input and process data for a
       series of curves.  Different curves may contain different numbers of
       points, and the spacing of points in the X direction is arbitrary.

       Until the buffer is reset the data are available for further processing
       with the FIT or SMOOTH or other commands.  You can change the
       coordinate system and display the data again to achieve translations,
       reflections, and zooms.

       If the buffer overflows then the screen is cleared, an error message is
       displayed, and RW terminates.  For some large data sets satisfactory
       results can be obtained by inserting a PLOT or JOIN command after every
       group of 1025 points.

       If REDWOOD DRAW comes to the end of the input file and there are
       unprocessed data in the buffer those points are displayed in the JOIN
       format.  Furthermore, if the limits for the data window have not been
       specified they will be set automatically before the curve is drawn.
       Both X and Y limits will be set 10 percent beyond the ranges of values
       found in the buffer.

       Both the ACTION COMMANDS and SET COMMANDS are explained in following
       chapters.  Generally ACTION COMMANDS produce output on the screen or
       process data in the buffer.  The SET COMMANDS establish certain
       parameters which are used in subsequent ACTION COMMANDS.

       ___________________________________
       ADD GRAPHICS TO YOUR QBASIC PROGRAM
        
       You can easily add REDWOOD graphics to enhance your program written in
       QBASIC or other language such as C or Pascal.  The following simple
       example in QBASIC places formatting commands and calculated values in
       an output file and then calls REDWOOD DRAW to produce a plot.

       ********************************************************************
       ' rwsine.bas    Uses RW graphics interactively under QBASIC
       f = 1
       start:  OPEN "rwsine.plt" FOR OUTPUT AS #1
       FOR x = 0 TO 720 STEP 5
               y = SIN(3.14159 * f * x / 180)
               PRINT #1, x, y
       NEXT x
       PRINT #1, "title bottom 'x';  title left 'y' "
       CLOSE #1
       SHELL "c:\rw\rw.exe  rwsine.plt"     ' Set path to the RW directory
       INPUT ; "Enter frequency > 0 to plot again. ", f
       IF f > 0 THEN GOTO start
       ********************************************************************

       The QBASIC command SHELL calls the DOS operating system with a quoted
       string containing two parameters.  The first is the path to the RW.EXE
       file which you installed in the directory C:\RW.  The second parameter
       is the name of the file which was just OPENed and CLOSEd in the
       preceding lines.  Two cycles of the sine wave will be shown by RW



                                         6

       complete with titles for the bottom and left axes.  After admiring the
       plot you can push the space bar to end RW.  Another prompt from QBASIC
       will instruct you to push another key to return to that system.  Then
       the INPUT line of the program invites you to enter a positive frequency
       f to make another plot.  If you do indeed enter a positive value for f
       then the program runs again from start.

       Simple programs like this often help to explore the role of critical
       parameters in a project or to make illustrations for publications or
       presentations.

       All other modern languages have commands corresponding to the QBASIC
       SHELL command to call RW with an input file which your program creates.
       For C the command is SYSTEM.  See the documentation for your compiler
       for more details.

       __________________
       COORDINATE SYSTEMS

       For many plots the automatic scaling provided by REDWOOD DRAW means
       that you need not be concerned about establishing  coordinate systems.
       However, if involved drawings are desired then the following
       information will be helpful.

       All plots are made on a conceptual graph pad corresponding to the
       screen with its 4 x 3 aspect ratio.  For convenience the height of the
       pad is arbitrarily taken as 10 graph units.  Then to provide the same
       scale in the horizontal direction the width is 40/3 or about 13.333
       graph units.  The origin of the graph pad is at the lower left corner,
       the X-axis extends to the right along the bottom of the pad, and the Y-
       axis extends upward along the left edge of the pad.  Therefore the
       graph pad lies in the first quadrant, and the upper right corner of the
       screen is at (13.333,10.0).  All geometrical elements may be located
       with respect to these graph coordinates.

       Unless explicit commands are issued, the data are plotted in a data
       window which extends from 20 to 90 percent of the graph pad dimensions.
       That is, the data window has corners at (2.667,2.0) and (12.0,9.0).

       You can explicitly assign limits to the window before plotting any
       data. Otherwise the default automatic scaling assigns limits to the
       data window which extend 10 percent past the range of the values found
       in the buffer when the first display command is encountered.  Curves
       are clipped to show only the portion within the limits of the data
       window.  If automatic scaling is used for a collection of curves, and
       if the range of values of the first curve is small, then the data
       window may be too small to show the remaining curves.  Avoid that
       situation by using a SET LIMITS command to define an adequate data
       window before the first data are plotted.

       Geometrical elements such as boxes and arrows are positioned with
       respect to the data system if the DATA key word follows the numerical
       coordinates.  The data transformation must have been established




                                         7

       previously, either automatically or with an explicit SET LIMITS
       command.



       ______________
       COMMAND FORMAT

       Commands can be entered in the input file by using any editor or word
       processor which produces simple ASCII output files.  A command consists
       of certain key words and numerical and text parameters or constants.
       Text parameters enclosed in either single (apostrophe) or double quotes
       are written on the graph pad by the TITLE command.  The case of
       characters within the quotes is preserved.  In all other places the key
       words and parameters may be in either case or may be of mixed case.

       Usually each command is on a separate line of the input file, but
       several commands may appear on a line if they are separated by
       semicolons, ";;;" .  This provides a more compact result if an input
       file is printed.

       Either a left parenthesis, "(", or a percent sign, "%", can be used to
       introduce a comment.  The comment is terminated either by the end of
       line or by a semicolon.  The introductory character and the remainder
       of the command are ignored.  Note that parentheses, the percent sign,
       and the semicolon may be included in text which is enclosed in quotes
       for the TITLE command.






























                                         8

       ______________
       COMMAND SYNTAX

       Commands are described in the following sections using mandatory key
       words, optional key words, and variables or parameters which take
       special values for an application.  The key words are printed in upper
       case here to distinguish them.  Key words must be spelled as shown,
       but case is ignored in the input file except in quoted strings.

       Parameters are printed in lower case in the syntax descriptions. These
       include numerical values, and in the command description they begin
       with the "#" sign, e.g. #xwidth.  An example in the input file might be
       2.5.  Generally a decimal point may be included in numbers; the decimal
       part is truncated if it is not appropriate.

       Other parameters are strings shown beginning with a "$" in the syntax
       definitions.  An example is $color which is used for several figures.
       Actual values in the input file could be red or LightBlue.  Either
       single or double quotes must enclose an output string for the TITLE,
       MORE, CASE, and SET PIEMODE commands, but quotes are not used with
       other string parameters.

       Special internal strings used in the TITLE and MORE commands are
       @FITFORMULA, @FITCORRELATION, @DATE, and @TIME.  The "@" sign is
       necessary, but the case may be changed in the input file.  An example
       is @FitFormula.

       Each command begins with at least one mandatory key word followed by
       several optional key words and parameters.  Optional elements are
       enclosed in brackets, "[]", in the descriptions.  In some cases only
       one item of a list may be chosen, and the elements of the list are
       separated by a vertical line, "|",  representing a logical OR.  If one
       element of a list must be chosen then the list is enclosed in braces,
       "{}".  These special symbols are also compounded in the definitions of
       some commands.






















                                         9

       ______________________
       COMMAND LINE ARGUMENTS

       Special command line arguments invoke features such as an automatic
       slide show or generation of hard copy if the input is a list file.  A
       list file must have the extension .LST, and each of its lines must
       contain the name of a command file.  The extension of a command file
       may be anything other than "LST".  We used "PLT" for general examples
       and "TUT" for illustrations of specific commands.

       In a previous example you started a slide show by entering the
       following at the DOS prompt:

            RW DEMO.LST  <Enter>

       That action shows each slide named in the list file DEMO.LST. Pressing
       the space bar brings up the next slide until the list is exhausted and
       REDWOOD DRAW terminates.

       You can start an automatic recycling slide show with a DOS command of
       the following format:

            RW FNAME.LST /A[UTO] #seconds  <Enter>

       In this case the list is repeated until <Control C> or <Control Break>
       is entered, and each slide will be held for #seconds after it is drawn.

       An example to show each of the demo slides for 3 seconds is

            rw demo.lst /a 3  <Enter>

       Files for hard copies of all the slides in a list file are created by
       using the /C[OPY] switch and $type on the command line:

            RW FNAME.LST /C[OPY] $type  <Enter>

       An example to make HP Laserjet files for each of the tutorial slides is

            rw tutor.lst /c hp1  <Enter>

       The 9 options for $type are PCX, HP1, HP2, HPV, TFV, PRT, PX1, PX2,
       TO1, and TO2.  See page 31 for more information.

       _________________
       CHANGING DEFAULTS

       If you prefer a background color or other parameter that differs from
       the default you can specify your choices in a file named RWCONFIG.SYS,
       see that section.








                                        10

       ===================
       3.  ACTION COMMANDS
       ===================
       ____________________________________________
       ARROW FROM #x1 #y1 [DATA]  TO #x2 #y2 [DATA]
           [SIZE #len] [FLARE #ratio] [$color [PATTERN]] [NOBORDER]

       Draw an arrow from point 1 to point 2.  If the DATA key word is used
       then the coordinates #x1, #y1 or #x2, #y2 are given in that system;
       otherwise they are graph coordinates.

       The length of the arrowhead is specified by the SIZE parameter;
       dimensions are in percent of the total screen height.  The default is
       2.0 (%).  The FLARE specifies the ratio of the width to length of the
       arrowhead.  The default is 0.5.  The arrow head will be filled with the
       color if given, but the default is an open triangle.  See the BOX
       command for color options.


       Examples:
            arrow from 3 4 to 5 4    % a horizontal arrow
                           %   2 units long
            arrow to 5 4 from 205 333 data red


       ___________________________ 
       BARGRAPH [$color [PATTERN]]

       Create a bar graph with the data in the buffer using the given color to
       fill the bars; see the BOX command for choices.  The number of series
       or families of data should have been established previously with the
       SET BARGRAPH NUMBER command.  The default number of families is one.
       The first series of data must contain the minimum and maximum x values
       for all families, and it must also contain the minimum x-difference.
       Intervals between x-values must be integral multiples of the minimum
       difference, but not all values need be present.

       This command must be issued after the data for each family have been
       input.

       Example:
            set scale x 4
            set limits y from 0 to 100
            set bargraph number 2
                 1986  30
                 1987  60
            bargraph red
                 1986  40
                 1987  80
            bargraph blue pattern







                                        11

       ______________________________________________    
       BIN [BINS #n] [FROM #xmin] [TO #xmax] [BY #dx]

       Replace the data in the buffer by a new set suited for plotting a
       HISTOGRAM or frequency distribution.  The new x values are centered in
       the bins specified by the command.  The #xmin or #xmax values are at
       the outer edges of the extreme bins.  Any consistent combination of
       parameters can be used to define the bins.

       The new y values give the total weight for all old x values which fall
       within the bin.  If the old y value was zero or was not given then the
       weight is taken as 1.0; otherwise the y value is added to the weight of
       the new bin.

       Examples:
            bin bins 20         % get limits from data in buffer
            bin from 10 to 100 by 5

       ______________________________________________________     
       BOX #xcenter #ycenter [DATA] [SIZE #xwidth [#yheight]]
                            [$color [PATTERN]] [NOBORDER]

       Draw a rectangle with sides parallel to the axes.  The coordinates give
       the center position.  If the key word DATA appears then data
       coordinates are used; otherwise the center is specified in graph
       coordinates.  The SIZE is given in graph units.  If #xwidth is given
       but #yheight is not specified then they are set equal to give a square.
       If the SIZE is not stated then the value established by the last SET
       BOX command or by the initialization will be used.  The default is
       #xwidth = #yheight = 1.0.

       The outline of the box will be drawn in the current line color unless
       the NOBORDER key word is present.  If $color from the following list is
       given then the interior of the box will be filled with that color.  A
       special pseudo-color is NOFILL which leaves previously drawn items
       inside the border of the new box.  If a fill color is not specified
       then the current background color is used.  Filling a box clears a
       portion of the screen to set off a legend or other elements.

       The valid fill key words are:

            black               nofill
            blue                lightblue
            green               lightgreen
            cyan                lightcyan
            red                 lightred
            magenta             lightmagenta
            brown               yellow
            white               brightwhite

       No spaces appear in the right hand column.

       When a graph is printed a black and white pattern similar to cross
       hatching is substituted for each color filled area.  If the key word



                                        12

       PATTERN appears after $color then the cross hatching is also shown on
       screen.  This can be used for a preview of the printed image or just
       for special effects.

       Example:
            box 20 3000 data size 3 1.5 lightcyan

       ____________ 
       CASE "$text"

       Use with the TITLE command to provide secondary characters of the
       extended set.  The extended set consists of pairs of regular ASCII
       characters.  If omitted then the secondary characters are taken as
       blanks, and the primary characters in the TITLE text are reproduced.

       Example:
            title 2 5 "A = R21/23"   % alpha = rho to 1/2 power
            case      "G   GX   X"   % select Greek, superscript

       The MORE command can be used to append primary characters to those
       given in the TITLE command.  Similarly the CASE command can be repeated
       to continue the secondary characters.  An example is given under the
       TITLE command, page 18.

       _________________________________________________________  
       CIRCLE #xcenter #ycenter [DATA] [SIZE #xwidth [#yheight]]
                            [$color [PATTERN]] [NOBORDER]

       Same as ELLIPSE.

       __________________________________________________________ 
       DIAMOND #xcenter #ycenter [DATA] [SIZE #xwidth [#yheight]]
                            [$color [PATTERN]] [NOBORDER]

       Draw a diamond with diagonals parallel to the plot axes.  The
       coordinates of the center are given in DATA coordinates if that key
       word appears; otherwise the graph coordinates are implied.  SIZE
       parameters are stated in graph units.  If the width is specified but
       the height is not given then they are set equal to give a square.  If
       no SIZE parameters are given then values from the last SET DIAMOND
       command are used.  The defaults are #xwidth = #yheight = 1.0.

       The $color parameter and the PATTERN and NOBORDER key words have the
       same meanings as described above for the BOX.

       Example:
            diamond 3.5 5 lightred










                                        13

       __________________________________________________________ 
       ELLIPSE #xcenter #ycenter [DATA] [SIZE #xwidth [#yheight]]
                            [$color [PATTERN]] [NOBORDER]

       Draw an ellipse with axes parallel to the plot axes.  The  center is
       located in DATA coordinates if that key word appears; otherwise graph
       coordinates are implied.  The SIZE key word allows specification of the
       major and minor axes; the dimensions are graph units.  If only #xwidth
       is given then #yheight is assigned the same value to form a circle.  If
       the SIZE is not given then values are retained from the last SET
       ELLIPSE or SET CIRCLE command or are the initialization defaults
       #xwidth = #yheight = 1.0.

       The $color parameter and the PATTERN and NOBORDER key words have the
       same meaning as in the BOX command described above.

       Example:
            ellipse 8 7 size 2 3 blue pattern

       ______________ 
       FIT [#formula]

       Approximate the data currently in the buffer by a least squares fit to
       one of the formulas given below.

        #formula      formula             type             requires

            0    best fit of following                     x, y > 0

            1    y = a + b x              linear           any x, y
            2    y = a + b ln x           logarithmic      x > 0
            3    y = a + b x^2            parabolic        any x, y
            4    y = a + b / x            hyperbolic       x <> 0
            5    y = 1 / ( a + b x )      hyperbolic       y <> 0
            6    y = a exp( b x )         exponential      y > 0
            7    y = a x^b                power            x, y > 0
            8    y = a + b x + c x^2      quadratic        any x, y

       The corresponding coefficients (a, b and c) are evaluated and placed in
       a string @FITFORMULA which can be displayed with the TITLE command.
       The correlation coefficient r is also computed and inserted in the
       string @FITCORRELATION for use with TITLE.  If #formula = 0 or is
       omitted then all eight forms are evaluated, and the one giving the
       largest correlation coefficient is chosen for the strings.  In all
       cases you can draw the resulting curve with the PLOT FIT command.

       For some formulas the coordinates must be restricted as indicated by
       the last column of the preceding table.  If those conditions are not
       met then a floating point error will occur and RW will place an error
       message on the screen and terminate.

       If SET LOG ON has been issued then the formula and correlation
       coefficient will also be output to the REDWOOD.LOG file.  The user
       variable names can be substituted for the generic names x and y and



                                        14

       superscript notation can be used to replace the caret symbol, "^", in
       order to write a tailored title instead of @FITFORMULA.

       Example:
            89.3  112
            ...
            437.1  298
            set symbol 3O  % square symbol
            plot           % show raw data
            fit 6          % approximate with exponential
            plot fit       % show the curve
            title top @fitformula    % write equation
            more "  "                % spaces
            more @fitcorrelation     % corr. coefficient

       ____________________________ 
       HISTOGRAM [$color [PATTERN]]

       Draw a histogram from the data in the buffer.  Those data should be
       equally spaced in x values.  In some cases the BIN function may be
       helpful in generating the x data.

       The $color and PATTERN have the meanings described above for the BOX
       command.

       Example:
            histogram lightred pattern

       __________________     
       INCLUDE $fname.ext

       Insert the contents of the named file into the command stream.  This is
       a convenient way to include a standard plot format or a series of
       commonly used data operations.  It can also insert a file containing
       data.  An included file can  include other files up to a total of 10
       levels of nested files.

       Each time a file is included it is read from its beginning so multiple
       passes can extract different columns from a data file.  An example is
       given under the SET ORDER command, page 25.

       Example:
            include head.fmt
            include 94oct17.dat
            include tail.fmt

       _________________ 
       IMPORT $fname.ext

       Fill the screen with a PCX format bitmap file such as those generated
       by PC Paintbrush, a product of Z-Soft Corporation.  The PCX file must
       have been generated in the EGA mode (have 350 lines of 640 pixels).
       After the PCX file has been imported as a background, subsequent
       commands may overlay portions of the screen with boxes containing X-Y



                                        15

       plots, pie charts, etc.  This allows the combination of free hand PCX
       files with overlaid technical plots.  The resulting screen can be saved
       in PCX format only; neither printer nor TIFF files can be made.

       Example:
            import rdwd1.pcx

       ____________      
       JOIN [#segs]

       Draw a curve using all the data points in the buffer.  If #segs is
       given it specifies the number of line segments between each pair of
       data points.  When #segs is absent then the number is chosen so that
       the maximum segment length is no more than one percent of the height or
       width of the data window.  The intermediate points all lie on a cubic
       joining each pair of data points, and successive cubics blend smoothly
       at the data points.

       When #segs equals one then a single straight line joins data pairs, and
       the speed increases because the cubics are not computed.

       The curve is clipped or appears only within the data window, but as a
       "trick" the SET WINDOW command can be used to extend the data window to
       the entire graph pad.

       Examples:
            join 1         % a polygon with vertices at data points
            join 5         % force 5 segments between data points

       __________________________________________  
       LINE FROM #x1 #y1 [DATA] TO #x2 #y2 [DATA]

       Draw a straight line between the two points given either in DATA or
       graph coordinates.  Unlike segments drawn by the JOIN command this line
       can also extend outside the data window.  Mixed coordinates can be used
       for the two end points as in the following illustration.

       Example:
            line from 0 0 to 337 91 data  % graph origin to data pt

       ______________________________________________________ 
       MORE {"$text"|@FITFORMULA|@FITCORRELATION|@DATE|@TIME}

       Extend the text started with the TITLE command.  This command can be
       placed anywhere before the next TITLE command, but it is more clear if
       placed just after the initiating TITLE command.

       Example:
            title 8 .3 "Plotted on "
            more @date







                                        16

       ___  
       NEW

       Clear screen and reset all parameters to defaults.  This command can be
       used after a PAUSE to start a new plot.

       ____________________ 
       PAUSE {KEY|#seconds}

       Wait for a key press if KEY appears in the command or else wait for the
       given number of seconds.  This allows a sort of animation in which
       certain features can be drawn or overlaid in a step wise manner.  In
       the automatic slide show mode a pause for key press is replaced by a
       pause for 5 seconds.

       Examples:
            pause key
            pause 10       % wait 10 seconds

       ________  
       PIECHART

       Draw a pie chart from the preceding data.  See SET PIEMODE.

       ___________________     
       PLOT [[AXES] [FIT]]

       If neither AXES nor FIT appears then plot the data points contained in
       the buffer with any specified error bars or symbols.  If symbols were
       not given on the data input lines then the general symbol established
       by the last SET SYMBOL command will be used.  The default symbol is a
       plus sign.

       Example:
            plot                % show plot symbols and error bars


       If the AXES key word occurs then plot the axes but do not plot the
       points.  If the limits have not been explicitly set then the data in
       the buffer are used to establish limits.  This command is usually not
       required because the axes are automatically plotted at the first PLOT,
       HISTOGRAM or JOIN command.  JOIN is automatically invoked before exit
       if none of the three has been explicitly called.  The main use is in
       special effects such as placing different axes on the right and left
       side of the data window.

       Example:
            set axes all on right off
            set limits y 0 to 10
            plot axes                % plot all but right axis
            set axes all off right on
            set limits y 0 to 300
            set color red            % change color for right axis
            plot axes                % plot right axis, new scale



                                        17


       If the FIT key word is used and the FIT command had been called then
       plot the approximating function.

       Example:
            12.4      459       % X-Y data
            ...
            54.7      873
            fit 1
            plot fit            % plot straight line approximation

       _________________________________________________________
       RECT #x1 #y1 #x2 #y2 [DATA] [$color [PATTERN]] [NOBORDER]

       Draw a rectangle with sides parallel to the axes.  The four coordinates
       specify any pair of diagonally opposed corners.  All other parameters
       have the meanings explained for the BOX command.
       The RECT command is more convenient for producing stacked rectangles,
       but the BOX command, with centered coordinates, is useful for other
       applications.

       Example:
            rect 2 3 12 2.5 data blue

       _____________________ 
       SMOOTH [LEVEL] #nhalf

       Replace the y values in the buffer by the simple average of data within
       #nhalf points on either side of each point.  This simple low pass
       filter replaces the original data with a smoother set which may enhance
       a structure obscured by noisy data.

       Example:
            smooth level 5      % average 11 points

       ____________________________________________________   
       TITLE [TOP|BOTTOM|RIGHT|LEFT| #x #y [DATA]] [CENTER]
             ["$text"|@FITFORMULA|@FITCORRELATION|@DATE|@TIME]
             [SIZE #height] [ANGLE #degrees] [LINES #num]

       Write text on the plot with location and orientation set by the given
       parameters or by those of previous TITLE commands.  Key words TOP,
       BOTTOM, RIGHT and LEFT cause centered text to be placed at the
       indicated positions relative to the data window.  If coordinates are
       given in DATA or graph systems then they mark the CENTER of the text if
       that key word appears; otherwise the coordinates locate the center of
       the first character of the text.

       The text can be given explicitly as a string of characters enclosed in
       either quotes or apostrophes (double or single quotes).  As in most
       languages if the delimiter appears within the text then it must be
       doubled, e.g. 'Don''t' is the same as "Don't".  Extend the text up to a
       total of 160 characters by using the MORE command.  Tabs cannot be in-
       cluded in the text.



                                        18

       Extended characters consisting of a pair of normal ASCII characters
       from the PC keyboard can be used in titles.  Primary characters are
       entered as a string in the TITLE command, and the corresponding
       secondary characters appear in a subsequent CASE statement.  For normal
       ASCII characters omit the CASE statement. (The secondary characters
       will all be blanks.)  Secondary characters are necessary for control
       codes for operations such as entering or leaving subscript or
       superscript mode or for spacing.  More details are in the description
       of the character set in chapter 6.

       The internal strings @DATE and @TIME give the date and time in the
       respective formats dd/mm/yy and hh:mm:ss.  Those internal strings are
       filled when REDWOOD DRAW is started.  If the FIT command has been
       exercised then the formula and correlation coefficient are available in
       their respective internal strings @FITFORMULA and @FITCORRELATION.

       ANGLE #degrees rotates the text counter clockwise from the horizontal.
       The initial value is zero degrees.  The ANGLE remains in effect until
       it is explicitly reassigned.

       LINES #num moves the starting position upward by #num lines with
       respect to the nominal position.  This is how you write several lines
       to finish at a desired height.  The number of lines may be a decimal
       fraction.

       SIZE #height gives the character height in per cent of the screen
       height.  The default is 2.0 (%).  Titles with the TOP key word are
       always 3/2 as tall as the current nominal size.

       If no position is specified then the new text will be placed below that
       of the last title command.  The automatic offset is twice the current
       SIZE, and the CENTER and ANGLE parameters persist until they are
       reassigned.

       The MORE command appends text to the same line, and the CASE command
       can be used to define secondary characters of pairs in the extended
       set.

       Example:
            set title size 4
            title 3 4 "a ( in / sec223 )"
            case      "            X X  "  % enter superscript,
                                           %  leave superscript
            title 3 3 "AB"     % lower case Greek alpha, beta
            case      "GG"
            more        "L"    % followed by upper case lambda
            case        "F" 




        





                                        19
       
       _____________________________________________
       TRIANGLE [DATA] [$color [PATTERN]] [NOBORDER]

       Draw a triangle with vertices at the first three points in the buffer
       and empty the buffer.  If less than three points are in the buffer then
       an error message is issued and REDWOOD DRAW terminates.  If the DATA
       key word appears the vertices are interpreted in that coordinate
       system; otherwise the graph system is implied.

       Parameter $color and key words PATTERN and NOBORDER have the same
       significance as in the BOX command.  The NOBORDER option allows filling
       any polygon by breaking it into a union of triangles filled with the
       same color.











































                                        20

       ================
       4.  SET COMMANDS
       ================
       _____________________________________________________________________
       SET ARROW [SIZE #length] [FLARE #ratio] [$color [PATTERN]] [NOBORDER]

       Set the length and aspect ratio of arrowheads drawn by the ARROW
       command.  The length is specified in per cent of the total graph height
       of 10 units.  The default length is 2 (%).  The flare is the ratio of
       the total width of the arrowhead to its length.  The default flare is
       0.5.

       The $color and NOBORDER options are described in the BOX action command
       of the previous section.  Defaults are nofill with border.

       Example:
            set arrow size 3 flare .8 black   % bigger, broader and filled

       _____________________________________________________   
       SET {AXES|AXIS} [{ALL|TOP|BOTTOM|RIGHT|LEFT}{ON|OFF}]

       Controls the presence of each axis which consists of the outline, ticks
       and labels.  Axes are drawn at the first HISTOGRAM, JOIN, PLOT or PLOT
       AXES command or before exit if none of these have been explicitly
       called.  Current axis parameters are used at that time.

       OFF disables drawing all components, but ON allows them to be drawn.
       Components can be individually controlled with the SET OUTLINE, SET
       TICKS and SET LABELS commands.

       The default is AXES ALL ON.

       Examples:
            set axes all off              % no axes
            set axes all off bottom on    % only bottom is drawn

       ____________________  
       SET BACKCOLOR $color

       Change the background color of the plot to one of the following 15
       choices.

            black
            blue                lightblue
            green               lightgreen
            cyan                lightcyan
            red                 lightred
            magenta             lightmagenta
            brown               yellow
            white               brightwhite

       There are no spaces in the words in the right column of the above
       table.




                                        21

       The SET BACKCOLOR command does not affect the colors of lines or other
       elements already on the screen. The default background color is white.

       Example:
            set backcolor lightblue

       ___________________   
       SET BAR SIZE #lhalf

       Set the half length of the transverse lines at the ends of error bars.
       The dimensions are graphical units, and the default is 0.1.

       Example:
            set bar size 0   % error bars are simple with no
                             %  transverse lines at ends

       ____________________________ 
       SET BARGRAPH NUMBER #nseries

       Specify the number of families or series of values for a bar graph.
       See the action command BARGRAPH for an example.

       _______________________________ 
       SET BOX SIZE #xwidth [#yheight]

       Set the width and height of subsequent boxes.  Dimensions are graphical
       units.  If only the width is specified then the height is given the
       same value to yield a square.  The defaults are #xwidth = #yheight =
       1.0.

       Example:
            set box size 3 .8

       __________________________________   
       SET CIRCLE SIZE #xwidth [#yheight]

       Same as SET ELLIPSE.

       ________________  
       SET COLOR $color

       Select the color for subsequent lines, text and symbols.  Options are
       the same as those under SET BACKCOLOR above.  The default line color is
       black.  The PLOT AXES command can be used to assure that axes are drawn
       while a particular color is active.

       Example:
            set color yellow








                                        22
       
       ___________________________________
       SET DIAMOND SIZE #xwidth [#yheight]

       Set the width and height for subsequent diamonds.  If only the width is
       given then the height is assigned the same value to make a square.
       Dimensions are graphical units, and the defaults are both 1.0.

       Example:
            set diamond size 3 1.5

       ___________________________________ 
       SET ELLIPSE SIZE #xwidth [#yheight]

       Set the major and minor axes for ellipses or circles.  If only the
       width is stated then the height is given the same value to yield a
       circle.  Dimensions are graphical units, and the defaults are both 1.0.

       Example:
            set ellipse size 3 1.5

       ___________________________________________________________ 
       SET GRID {OFF|HORIZONTAL|VERTICAL|ON|SYMBOL [$pc][SIZE #h]}

       Enable a grid which is aligned with the large tick marks of the axes.
       It will be drawn when the data window is constructed.

       The default is OFF which disables all grid marks.  Choosing
       HORIZONTAL gives lines parallel to the x-axis and passing through the
       large tick marks on the y-axes.  VERTICAL yields vertical lines only.
       ON produces both vertical and horizontal lines or a rectangular grid
       passing through the major tick marks of the axes.  SYMBOL $pc uses the
       given primary and case characters to select a symbol which is
       replicated at the intersections of an imaginary rectangular grid
       through the major ticks.  The default symbol is $pc = 0O (zero, capital
       "Oh") which gives a centered plus sign.  The character set is described
       in a later section.

       Examples:
            set grid on
            set grid horizontal
            set grid symbol 1O size 3      % a large x

       ____________________________________________________________
       SET HPV [WIDTH #inches] [DPI #dots] [{LANDSCAPE | PORTRAIT}]

       Set parameters for the one variable HP LaserJet hard copy option and set 
       same values for TIFF files for desktop publishing (see options F4 and F5
       in section 6 on Hard Copy).  The WIDTH is always the larger side of the
       4:3 graph.  It can be as large as 8.00 inches for the portrait
       orientation and up to 10.50 inches for landscape orientation.  The
       latter case can be used for larger figures for overhead projection.
       The total number of pixels across the width of the graph is #inches *
       #dots.  That number should be larger than 500 to 700 to prevent a
       grainy appearance.  This command can be included in any input file, but


                                        23

       it is a good candidate for the RWCONFIG.SYS file to modify the defaults
       which are:

            set HPV  width 10.5  dpi 150  landscape

       ____________________________________________________________ 
       SET LABELS [SIZE #ht] [{ALL|TOP|BOTTOM|RIGHT|LEFT} {ON|OFF}]

       Set the size of numeric labels along the axes and determine which axes
       will be labelled.  The units of the label height and the height of any
       text are percent of the total screen height.  The default is #ht = 2
       (%), giving characters 0.2 graph units tall, with labels ON for the
       left and bottom and OFF for top and right.

       Examples:
            set labels size 3             % bigger labels
            set labels all off            % no labels
            set labels all off top on     % label top only

       __________________________________________________________
       SET LIMITS [X [FROM] #x1 [TO] #x2] [Y [FROM] #y1 [TO] #y2]

       Specify limits for the rectangular data space.  If limits are not
       specified then they are automatically set to 10% beyond the range of
       data in the buffer at the first invocation of PLOT, PLOT AXES, JOIN or
       HISTOGRAM.  The JOIN command is issued automatically before exit if
       there are data in the buffer and no explicit command has caused them to
       be plotted.

       If limits are set automatically the maximum x and y values will be
       respectively at the right and top of the rectangle.  However, limits
       can be explicitly specified increasing in either direction.  That is,
       #x1, the value at the left side of the box, can be greater than #x2,
       the value at the right; and #y1, at the bottom, can be larger than #y2,
       at the top.

       Examples:
            set limits x from 10 to 0 y from 0 to 20
            set limits y 0 10 x 100 200

       After a curve has been JOINed from data in the buffer it can be drawn
       again in a reflected, translated or expanded form after setting new
       coordinates.

       Example:
            set limits x -5 5 y 0 10
            join                     % draw the curve
            set limits x 5 -5        % flip the x axis
            join                     % draw the reflection




       



                                        24
       ________________
       SET LINESTYLE #n

       Select a pattern for subsequent lines and text.  There are 11 choices
       that can be seen on slide LINESTYLE.TUT.  Five of the choices can also
       be selected with the SET TEXTURE command.  The default is #n = 0 which
       gives solid lines.  Values 1 through 10 give patterns ranging from
       small dots through dashes of several sizes to combinations of dots and
       dashes.

       Example:
            set linestyle 9     % dash and double dots

       ________________
       SET LOG [ON|OFF]

       Enable or disable output to the file REDWOOD.LOG.  If an old version of
       this file exists it will be deleted and a new version will be opened
       each time that REDWOOD DRAW is started.  Each line of the input file
       will be copied to the log file as long as it is enabled.  Also if the
       FIT command is executed then the approximating equation and correlation
       coefficient will be placed in the log file.  Since the approximating
       function is always written in terms of variables X and Y it may be
       desirable to convert to the names appearing in the titles on the axes.
       The log file can be edited and renamed to replace the original input
       file.  Any error messages are always replicated in the log file as an
       aid in identifying incorrect input statements.

       Example:
            set log on

       _____________________________________________________
       SET MENU [BACK $color1] [TEXT $color2] [HIGH $color3]

       Assign colors for the background, general text, and highlighted
       function keys in the hard copy menu.  More details are given in the
       chapter on hard copy.  Since some monochrome displays map colors into
       various gray shades or textures it may improve readability to change
       from the defaults of white, black, and lightred respectively.  To see
       how all 15 colors look run RW with input file COLORS.PLT.
       
       _____________________________________     
       SET ORDER [X [#xfactr]] [Y [#yfactr]]
                 [DX [#dxfactr]] [DY [#dyfactr]] [SYMBOL] [DUM]

       Set the order in which the values of a data line will be interpreted.
       Each value is a number or a string.  Values must be separated by
       blanks; commas are not accepted as separators.  The default order is  X
       Y.

       X and Y are data values, and DX and DY are half-widths (in data
       coordinates) for the error bars used in the PLOT command.  The defaults
       for DX and DY are zero; they change only if assigned values for each
       point.  If a variable is followed by a numerical factor in the SET



                                        25

       ORDER command then each input value will be multiplied with the factor
       to form the final value placed in the data buffer.
       SYMBOL will be used to plot the point.  It may be given by a single
       character or by a pair from the extended character set.

       DUM means that the alphanumeric string at that location on the data
       line will be ignored.  Multiple DUM's can be used to skip over several
       fields of the data line.  It is not necessary to DUMmy away trailing
       values after the desired variables have been read.  You may specify up
       to 40 fields per line, but the first must be numeric to indicate a data
       line.

       A data line is recognized because the first non blank character is
       numerical.  It is not possible to DUMmy away non numerical leading
       alpha characters.

       Example and data line:
            set order x dum dx dum dum y dy symbol
            4 foo 1 843 34.5 6 1.5 3O     % symbol is a square

       Example with included file, use two columns for y values:
            set limits x 0 50 y 0 10
            set order x dum y 100         % y is 100 times 3rd col
            include table.dat             % read file
            join
            set order x dum dum y         % y is 4th column
            include table.dat             % rewind and read file
            join

       __________________________________________________
       SET OUTLINE [{ALL|TOP|BOTTOM|RIGHT|LEFT} {ON|OFF}]

       Enable or disable sides of the box surrounding the data rectangle.  To
       draw a side the corresponding axis must also be enabled; see SET AXES.

       Examples:
            set outline all off
            set outline all off bottom on right on

       _____________________ 
       SET PIEMODE [PERCENT]

       Prepare to input data for a piechart. If the key word PERCENT is
       present then the percentage represented by each slice will be appended
       to its label.

       Subsequent data commands each describe one segment of the pie.  The
       data format is

            #number  $color  "$label"

       This mode remains on until the chart is drawn with the action command
       PIECHART.  The SET PIEMODE command also sets all axes off so no data
       window will be drawn.



                                        26


       Example:
            set title size 4
            title top lines -.5 'SALES BY REGIONS'
                 set piemode percent
                      900 red    'East'
                      600 green  "North"
                      900 blue   'West'
                      300 black  'South'
                 piechart

       _________________________________________________________
       SET SCALE {X|Y} [#n1 [#n2]] [BASE #b] [LINEAR|LOG [NDEC]]

       Specify scaling for the two axes.  Integers #n1 and #n2 give the
       numbers of major and minor intervals.

       Linear:

       The axis will contain no more than |#n1| + 1 major intervals, and they
       will each be divided into |#n2| subintervals.

       The axis is laid out with |#n1| intervals of length BASE*ROUND*POWER,
       where ROUND is 1., 2., 2.5, or 5. and POWER is an integral power of
       ten.  The default BASE is 10, but it can be set to any value with the
       parameter #b. Parameters ROUND and POWER are selected to minimize the
       length of an axis which is at least as long as the difference of the
       limits.  Generally that axis extends past the limits so that major
       ticks and labels would not be shown at the ends of the axis.  However,
       if SET LIMITS is used to assign limits which fit the multiples of
       BASE*ROUND described above then labels also appear at the ends.

       If #n1 is positive then big ticks are used at major intervals, and
       similarly if #n2 is positive then big ticks are also used at
       subintervals.  Default values are #n1 = 6 and #n2 = -5 which produces
       about 6 major intervals separated by large ticks.  The major intervals
       are divided by small ticks into 5 subintervals.

       Log:

       The BASE #b can be any floating point number; the default is 10.
       Integral powers of the logarithmic base are labeled in exponential
       form, e.g. 2^4.  If #n2 is negative and the BASE is ten then short
       ticks are used at 2, 3, 4, 5, 6, 7, 8, and 9 times the next smaller
       integral power of ten.  If #n2 is positive then large ticks are used
       throughout.

       The number of decimal figures shown in the labels is given by #ndec.
       The default is zero which truncates the base to its integral part.

       To avoid error messages from the logarithm function, RW substitutes
       1.0E-37 for smaller data.  Prescaling is necessary to handle logarithms
       of smaller positive values.




                                        27

       Examples:
            set scale x linear y log
            set scale y log base 2
            set scale x log 3 base 2.7182818  % natural, 3 decimals
            set scale x 4 -6 base 6           % for 24 hour axis

       ___________________________
       SET SYMBOL [$pc] [SIZE #ht]

       Select the default symbol for subsequent calls to PLOT.  Individual
       data points can still be assigned explicit symbols, see SET ORDER.  The
       symbol may be assigned a single character which becomes the PRIMARY
       character with the CASE character as a blank or both parts of the pair
       may be set.

       SIZE of the symbol is given in per cent of the total screen height.
       The default is #ht = 2.0 (%).

       The default symbol is a centered plus sign.  Any pair of the extended
       character set can be used, but the subset 0O to 9O (zero, capital "Oh"
       to nine, capital "Oh") are also centered on the data point.

       Examples:
            set symbol RW size 4.5   % big right arrow symbol
            set symbol 3O            % centered square symbol
            set symbol A             % use letter A

       _______________________________________________
       SET TEXTURE [SOLID|DOTS|DASHES|DAASHES|DOTDASH]

       Set the texture                                               of subsequent lines and text.  This command corresponds
       to a subset of SET LINESTYLE #n with values #n = 0, 2, 4, 5, and 8
       respectively.  The default is SOLID.

       Example:
            set texture daashes

       _______________________________________________________________________
       SET TICKS [SIZE #major [#minor]] [{ALL|TOP|BOTTOM|RIGHT|LEFT} {ON|OFF}]

       Enable or disable drawing ticks along the sides of the data box and
       directly set the length of ticks.  Tick sizes are given in per cent of
       the distance to the opposite side of the data window.  Default values
       are ALL ticks ON, and #major = 3.0 and #minor = 1.0.  Positive values
       put the ticks inside the window, negative values outside.  Values of
       100 and 100 extend all ticks across the window which may be desired for
       logarithmic scales as in the following example.

       In order to draw ticks the axis must also be enabled; see SET AXES.







                                        28

       Example:
       set scale x 6 -5 base 10 log   y 6 -5 base 10 log
       set limits x 1 1000  y .1  100
       set ticks size 0 100 all off right on top on
       set texture dots
       set axes all off right on top on
       plot axes           % dots for minor grid
       set ticks size 100 0
       set texture solid
       plot axes           % solid major grid
       set ticks size 3 1 all on
       set axes all on
       plot axes           % solid minor ticks, box and labels

       ____________________
       SET TITLE [SIZE #ht]

       Set the height for general titles; the height of TOP titles is 1.5
       times this value.  Dimensions are per cent of the total screen height.
       The default value is 2.0 (%).

       Example:
            set title size 3.5

       ____________________________________________ 
       SET WINDOW [X #x1 [TO] #x2] [Y #y1 [TO] #y2]

       SET WINDOW [X #n1 OF #n2] [Y #m1 OF #m2]

       The first form sets the coordinates of the data window in graphical
       units.  Several windows, including inserts, can appear on the graph
       pad.  (Before drawing an insert it may be convenient to clear the area
       using the BOX command.)
       The default window runs from 20 % to 90 % of the available X and Y
       dimensions; for the initial graph pad (13.333 x 10.0) the window
       extends from 2.667 to 12.000 in the x-direction and from 2.0 to 9.0 in
       the y-direction.

       The second form uses the OF key word and divides the graph pad into #n2
       subpads in the x-direction and #m2 subpads in the y-direction.  Usually
       #n1, #n2, #m1, and #m2 would be integers, but non-integer values can
       also be used for special positioning effects.  Within the subpads the
       data box is again set to the default 20 % to 90 % portion.

       Examples:
            set window x 1 to 4 y 1 to 3  % bottom left of pad
            set window x 7 to 12          % right side of pad
            set window x 3 of 3 y 2 of 2  % upper right 6th of pad









                                        29

       ==============================
       5.  RWCONFIG.SYS AND DEFAULTS
       ==============================

       If you frequently modify some parameters such as menu colors or title
       size you could copy similar lines into each command file, but if the
       changes are always the same it is more convenient to place them in a
       file named RWCONFIG.SYS.  At every start up RW assigns the default
       values described in this manual.  Next RW searches the current
       directory then the directory from which RW was loaded for a file
       RWCONFIG.SYS.  The first such file found is loaded giving you a
       mechanism to over ride the defaults for selected parameters.  You can
       place a different RWCONFIG.SYS in each directory where you want a
       custom format.  To maintain the original contents of the file, showing
       the core defaults, keep a copy on a floppy diskette or copy the
       original to RWCONFIG.SAV on the hard disk.  If no RWCONFIG.SYS file is
       found in either of the two standard directories then core defaults are
       used.







































                                        30

       ==============================
       6.  HARD COPY AND OUTPUT FILES
       ==============================

       Several methods are provided to produce copies of plots from REDWOOD
       DRAW.  Files are generated that can be sent directly to printers.  Also
       files can be made in two standard graphics formats, PCX and TIFF, and
       these files can be imported by various publishing programs that include
       graphics in their output.

       Many dot matrix printers accept at least one of the output files
       produced by REDWOOD DRAW.  Some printers require setting of slider
       switches or front-panel controls to enable a particular mode.  For
       example, the IBM X24 24 pin dot matrix printer supports the 9 pin
       Proprinter mode if all the control switches are off, but it will also
       work in the 24 pin AGM (Alternate Graphics Mode) if switch 7 is on.
       The Epson LQ870 supports both of those modes automatically.  Consult
       your printer manual for details.

       To generate copy from a command file draw it first by invoking REDWOOD
       DRAW with the usual DOS command:

            RW FNAME.PLT  <Enter>

       After the plot is on the screen, press the F1 function key  to bring up
       the following menu of output options:

       ************************************************************
       F1  Generate file fname.PCX a PC Paintbrush  format file

           For hard copy send files to printer with:  COPY /B fname.ext prn

           For HP Deskjet or Laserjet or compatible laser printer:
       F2  Generate file fname.HP1  (  2.13 x 1.60 inches ) 300dpi  portrait
       F3  Generate file fname.HP2  (  4.27 x 3.20 inches ) 300dpi  portrait
       F4  Generate file fname.HPL  ( 10.50 x 7.88 inches ) 150dpi landscape

           For desktop publishing, make a TIFF file:
       F5  Generate file fname.TFL  ( 10.50 x 7.88 inches ) 150dpi landscape

           For IBM Proprinter or compatible 9 pin printer:
       F6  Generate file fname.PRT  (  6.50 x 4.88 inches )

           For IBM X24 or compatible 24 pin AGM printer:
       F7  Generate file fname.PX1  (  3.56 x 2.67 inches )
       F8  Generate file fname.PX2  (  7.11 x 5.33 inches )

           For TOSHIBA P321SL or compatible 24 pin printer:
       F9  Generate file fname.TO1  (  3.56 x 2.67 inches )
       F10 Generate file fname.TO2  (  7.11 x 5.33 inches )

           Press space bar to return to list or to end program.
       ************************************************************




                                        31

       The first option, selected by pressing the F1 function key, produces a
       PCX format file in color with EGA resolution of 640 x 350 pixels.
       These files could be imported into REDWOOD DRAW, perhaps to be used in
       a slide show, and they also may be used with several publishing
       programs.

       The next two options produce files to be plotted on a HP Laserjet or
       compatible laser printer at 300 dots per inch.  The smaller, with
       extension HP1, has 640 x 480 pixels, and the next has two times those
       linear dimensions.

       The next two options can be modified by including the set HPV command
       in either the RWCONFIG.SYS file or in the command file FNAME.PLT.  The
       example shown here would be selected by

            set HPV width 10.500 dpi 150 landscape

       The acronym HPV stands for HP Variable, and, in this case, the
       landscape orientation was chosen.  Therefore the extension for F4 on
       the previous screen is HPL.  The set HPV command assigns the same
       parameters for the TIFF file so the extension TFL appears for F5.  If
       portrait orientation had been selected the last two extensions would
       have been HPP and TFP respectively.

       Two more options make graphic files of two sizes for 24 pin dot matrix
       printers using the AGM (Alternate Graphics Mode).  This class includes
       the IBM X24 and several other popular models.

       The final two options generate graphic files for Toshiba 24 pin
       printers.

       The HP files can also be converted to TIFF Format with an auxiliary
       program, RWHP2TIF.EXE, included on the distribution diskette.  Simply
       issue the DOS command

            RWHP2TIF  <Enter>

       and instructions appearing on the screen will request the name of the
       input file.  A single file of type HP1, HP2, HPP or HPL or a list file
       containing the names (and extensions) of up to 15 HPx files can be
       input.  In the latter case the list file must have LST as extension,
       e.g. HPGROUP.LST.  Each of the converted output files has the same name
       and a corresponding new extension of TF1, TF2, TFP, or TFL
       respectively.

       Another auxiliary program, RWHPCOMB.EXE, forms a compact hard copy of a
       group of plots for a laser printer.  Up to 15 of the smallest files
       (having HP1 as extension) can be printed on a single 8 1/2 x 11 inch
       page.  The program can be started with

            RWHPCOMB  <Enter>

       The program will request a list file, with extension LST, as input.
       Each line of the list file must include the name of a HP1 type file.



                                        32

       (The extensions within the list file are ignored and are replaced with
       HP1.)  The name (and path) of the output file is requested.  An
       extension of HPC will be appended automatically.  The combined image is
       placed in the new output file.  Since this combined file is larger it
       must be printed on a laser printer of sufficient memory, usually 1.5 MB
       for a combination of 15 HP1 files.  If the laser printer only has a
       half megabyte of memory it can handle a combination of about 7 HP1
       files.  Reduce the number of names in the list file until the
       combination is printed properly.  No more than the first 15 files will
       be taken from a longer list.  The name of the individual input file
       appears under each of the images in the combination.

       All bitmap files must be sent to the proper printer using the COPY
       command with the binary mode switch, e.g.

            COPY /B FNAME.EXT PRN  <Enter>

       The normal print command would inject control characters and ruin the
       graphic images.

       Parameters can also be specified on the DOS command line for the
       utility programs as well as for REDWOOD DRAW itself.  This greatly
       reduces the operator interaction required for handling routine data in
       a standard format.

       For example, suppose that data were generated every day of the last
       week of June, 1990, and are available in files JUN2590.DAT, ...
       JUN2990.DAT.  Suppose also that the format of the plot had been defined
       in command files HEAD.FMT and TAIL.FMT.  Then an editor was used to
       generate a new command file JUNXX90.PLT for each day with contents:

            include HEAD.FMT
            include JUNXX90.DAT
            include TAIL.FMT

       A list file, WEEK.LST, was made containing:

            JUN2590.PLT
            JUN2690.PLT
            JUN2790.PLT
            JUN2890.PLT
            JUN2990.PLT

       Now a laser printer file of type HP1 is generated for each day by
       invoking REDWOOD DRAW with:

            rw week.lst /c hp1  <Enter>

       As soon as the HP1 files are made they can be combined into a new file
       JUN25WK.HPC on the E: disk by issuing:

            rwhpcomb week.lst e:\jun25wk  <Enter>

       



                                        33


       The combined image file is sent to the laser printer with:

            copy /b e:\jun25wk.hpc prn  <Enter>

       The individual HP1 files can also be converted to TIFF by passing a
       list file to the program RWHP2TIF.  This new list file, say
       WEEKHP1.LST, can be made by copying WEEK.LST and changing all
       extensions from PLT to HP1.  (The RWHP2TIF program also accepts laser
       printer files of type HP2, HPP, and HPL.)  Conversion is effected by:

            rwhp2tif weekhp1.lst e:\tiffdir  <Enter>

       Each of the new files has extension TF1 and is placed in the indicated
       directory.

       If it is only desired to produce the TIFF files then the  set HPV
       command could be used in RWCONFIG.SYS to select the parameters and then
       pass the list of PLT files to RW with the following hard copy option:

            rw week.lst /c tfv  <Enter>

       You can step through the descriptions of the last pages using two list 
       files, DEMO1.LST and DEMO1HP1.LST, provided on the RW diskette.  
       You can quickly create 15 TIFF files which you can import into your 
       WORD or other word processor documents.  You will also have made 15 
       small (.HP1 type) files and a full page combination file which can be 
       sent directly to a HP Laserjet printer.

       The last few examples using input lists and other command line
       parameters could also be combined in a single DOS batch file for
       further simplification.

       The programs RWHPCOMB.EXE and RWHP2TIF.EXE both read from input files
       containing large bitmaps, and they also write large bitmaps to an
       output file.  If the input and output files were on the same physical
       disk then many time consuming seeks would be carried out as the disk
       head moves back and forth between the input file and the output file.
       The speed is often increased by placing the output file on another
       physical drive, even a floppy.  A RAM disk of sufficient size is
       excellent for the output.
















                                        34

       =================
       7.  CHARACTER SET
       =================

       An extended character set can be used with the TITLE, MORE, and CASE
       commands to write mathematical formulas, Russian, Greek and many other
       special symbols.  The extended characters are specified by a pair of
       ordinary ASCII characters which appear on the PC keyboard.  The primary
       character of a pair appears in a TITLE or MORE statement, and the
       secondary character is placed in a corresponding CASE command.  An
       example is

            title 2 9 "Q011 = A"
            case      "GX X   G"

       which translates to "theta sub one equals alpha" involving two lower
       case Greek characters and a subscript.  The secondary character G
       selects lower case Greek, the  control pair "0X" shifts into subscript
       mode, and the pair "1X" causes an exit from that mode.  A blank is the
       secondary character for the subscript 1, the equal sign, and blank
       itself.

       Most ASCII characters can be produced using the form on the keyboard as
       primary character and omitting the secondary character.  In that
       situation the secondary character is automatically filled with a blank.

       The lower case Roman alphabet can also be represented by upper case
       Roman primary characters with "L" as the secondary character.  For
       example, "AL" is equivalent to "a ".  This form is included to maintain
       compatibility with old TOPDRAW files written on terminals with no lower
       case symbols.

       Other secondary characters give the symbols listed below.  A few of
       them can also be found among the ordinary PC keyboard characters and
       therefore can be called directly using blank as the secondary
       character.

       Upper case Greek alphabet (F):             RF   Rho
            AF   Alpha                            SF   Sigma
            BF   Beta                             TF   Tau
            GF   Gamma                            UF   Upsilon
            DF   Delta                            FF   Phi
            EF   Epsilon                          CF   Chi
            ZF   Zeta                             YF   Psi
            HF   Eta                              WF   Omega
            QF   Theta
            IF   Iota                        Lower case Greek alphabet (G):
            KF   Kappa                            AG   alpha
            LF   Lambda                           BG   beta
            MF   Mu                               GG   gamma
            NF   Nu                               DG   delta
            XF   Xi                               EG   epsilon
            OF   Omicron   (Oh Eff)               ZG   zeta
            PF   Pi                               HG   eta



                                        35

            QG   theta                            BC   beh
            IG   iota                             VC   veh
            KG   kappa                            GC   geh
            LG   lambda                           DC   deh
            MG   mu                               EC   yeh
            NG   nu                               XC   zheh
            XG   xi                               ZC   zeh
            OG   omicron                          IC   ee
            PG   pi                               1C   ee kratkoy
            RG   rho                              KC   kah
            SG   sigma                            LC   el
            TG   tau                              MC   em
            UG   upsilon                          NC   en
            FG   phi                              OC   oh        (Oh See)
            CG   chi                              PC   peh
            YG   psi                              RC   err
            WG   omega                            SC   ess
                                                  TC   teh
       Upper case Cyrillic alphabet (B):          UC   ooh
            AB   Ah                               FC   ef
            BB   Beh                              HC   kha
            VB   Veh                              CC   tseh
            GB   Geh                              2C   cheh
            DB   Deh                              3C   shah
            EB   Yeh                              4C   shchah
            XB   Zheh                             QC   tvyordy znak
            ZB   Zeh                              YC   yery
            IB   Ee                               5C   myaki znak
            1B   Ee Kratkoy                       6C   eh oborotnoye
            KB   Kah                              WC   yoo
            LB   El                               JC   yah
            MB   Em
            NB   En                          Punctuation symbols (P):
            OB   Oh   (Oh Bee)                    .P   colon
            PB   Peh                              ,P   semi-colon
            RB   Err                              EP   exclamation mark
            SB   Ess                              UP   question mark
            TB   Teh                              IP   interrobang
            UB   Ooh                              AP   apostrophe
            FB   Ef                               QP   quotation mark
            HB   Kha                              PP   section symbol
            CB   Tseh                             DP   dagger
            2B   Cheh                             FP   double dagger
            3B   Shah
            4B   Shchah                      Additional special symbols (S):
            QB   Tvyordy Znak                     DS   dollar sign
            YB   Yery                             CS   cent sign
            5B   Myaki Znak                       +S   ampersand
            6B   Eh Oborotnoye                    PS   pound sign
            WB   Yoo                              AS   at sign
            JB   Yah                              0S   percent sign (zero Ess)
                                                  VS   vertical line
                                                  WS   double vertical line
       Lower case Cyrillic alphabet (C):          US   underline
            AC   ah                               NS   not sign


                                        36

            /S   backwards slash             Arrows and pointers (W):
            (S   left bracket                     UW   up arrow
            )S   right bracket                    DW   down arrow
            LS   left brace                       LW   left arrow
            RS   right brace                      RW   right arrow
            BS   left angle bracket               BW   left/right arrow
            ES   right angle bracket
            XS   accent mark                 Physics special symbols (K):
            TS   caret mark                       HK   h-bar
                                                  LK   lambda-bar
       Mathematical symbols (M):
            .M   dot product                 Astronomical symbols (A):
            XM   cross product                    HA   sun
            /M   division sign                    MA   Mercury
            PM   group plus                       VA   Venus
            *M   group multiply                   EA   Earth
            +M   plus or minus                    WA   Mars
            -M   minus or plus                    JA   Jupiter
            LM   less than                        SA   Saturn
            GM   greater than                     UA   Uranus
            MM   less than or equal               NA   Neptune
            HM   greater than or equal            PA   Pluto
            NM   not equal                        OA   moon      (Oh Ay)
            =M   identically equal                CA   comet
            AM   approximately equal              *A   star
            CM   congruent to                     XA   ascending node
            SM   similar to                       YA   descending node
            RM   proportional to                  KA   conjunction
            TM   perpendicular to                 QA   quadrature
            2M   square root                      TA   opposition
            DM   degrees                          0A   Aries     (zero Ay)
            IM   integral sign                    1A   Taurus
            JM   line integral                    2A   Gemini
            YM   partial derivative               3A   Cancer
            ZM   del                              4A   Leo
            (M   left floor bracket               5A   Virgo
            )M   right floor bracket              6A   Libra
            BM   left ceiling bracket             7A   Scorpius
            EM   right ceiling bracket            8A   Sagittarius
            0M   infinity  (zero Em)              9A   Capricornus
                                                  AA   Aquarius
                                                  BA   Pisces
       Set theoretic symbols (T):
            ET   existential quantifier      Centered symbols (O, cap "Oh"):
            AT   universal quantifier             0O   vertical cross(zero Oh)
            MT   membership symbol                1O   diagonal cross
            NT   membership negation              2O   diamond
            IT   intersection                     3O   square
            UT   union                            4O   fancy diamond
            LT   contained in                     5O   fancy square
            GT   contains                         6O   fancy vertical cross
            KT   contained in or equals           7O   fancy diagonal cross
            FT   contains or equals               8O   star burst
                                                  9O   octagon



                                        37


       Special drawing symbols (D):          Vertical movement (V):
            UD   underscore                       1V   half space up
            OD   overscore (Oh Dee)               2V   half space down
                                                  3V   one third space up
       Horizontal movement (U):                   4V   one third space down
             U   null                             5V   one sixth space up
            0U   back space (zero Yu)             6V   one sixth space down
            1U   half space
            2U   half back space             Sub and superscript control (X):
            3U   one third space                  0X   enter sub mode(zero Ex)
            4U   one third back space             1X   leave sub mode
            5U   one sixth space                  2X   enter super mode
            6U   one sixth back space             3X   leave super mode

       The above underscore and overscore characters allow drawing lines under
       or over a line of text.  Two consecutive underscore characters join
       together to form a continuous line.  That is not true of the underline
       character.  The continuous underscore aids in generating fractions.
       The overscore following the square root sign can form a full radical
       sign.

       Any level of subscripts or superscripts can be used.  The motion
       control characters facilitate backing up to place both subscripts and
       superscripts on a symbol.

       The extended character set can be displayed by using the file
       CHARSET.PLT, and the order of the characters is the same as in the
       tables above.  The character consisting of seven horizontal lines in
       the lower right corner of the plot is produced when an invalid
       character pair is used.  It can be explicitly called with the pair
       "$$".

























                                        38

       =====                                 histogram, 15
       INDEX                                 HP Laserjet, 31
       =====                                 IBM Proprinter, 31
                                             IBM X24, 31
       %, 8                                  import, 15
       (, 8                                  include, 15
       ;, 8                                  insert, 15
       @DATE, 19                             internal strings, 19
       @FITCORRELATION, 19                   join, 16
       @FITFORMULA, 19                       key press, 17
       @TIME, 19                             key words, 8
       [], 9                                 landscape, 23
       {}, 9                                 least squares, 14
       |, 9                                  line, 16
       AGM printer, 31                       line color, 22
       arrow, 11                             linestyle, 25
       aspect ratio, 7                       logarithmic, 27
       average, 18                           menu, 31
       axes, 17                              more, 16
       background color, 12, 21              movement, 38
       bar graph, 11                         new, 17
       bins, 12                              noisy data, 18
       box, 12                               parameters, 8
       braces, 9                             pause, 17
       brackets, 9                           PC Paintbrush, 15, 31
       case, 8                               PCX format, 15, 32
       Clear screen, 17                      pie chart, 17
       clip, 16                              plot, 17
       color, 21, 22                         polygon, 20
       command, 8                            portrait, 23
       command line arguments, 10, 33        position, 7
       comment, 8                            printers, 31
       constants, 8                          quotes, 8, 18
       coordinate systems, 7                 rectangle, 12, 18
       copies, 31                            rewind, 26
       COPY /B, 33                           scaling, 7, 27
       correlation, 14                       secondary characters, 13
       cubic, 16                             semicolon, 8
       Cyrillic alphabet, 36                 slide show, 10
       data statements, 5                    smooth, 18
       data window, 7                        stop RW, 4
       default, 10                           subscript mode, 38
       delimiter, 18                         superscript mode, 38
       diamond, 13                           symbols, 17
       distribution diskette, 2              syntax, 9
       ellipse, 14                           templates, 4
       extended character, 35                text, 8
       fill color, 12                        TIFF, 32
       fit, 14                               TOPDRAW, 1
       formulas, 35                          TOSHIBA P321SL, 31
       frequency distribution, 12            triangle, 20
       graph coordinates, 7                  vertices, 20
       graph pad, 7                          wait, 17
       Greek alphabet, 35                    weight, 12
       hard copy, 31                         write text, 18


                                        39
