man(1) Manual page archive


     PLOT(5)                                                   PLOT(5)

     NAME
          plot - graphics interface

     DESCRIPTION
          Files of this format are produced by routines described in
          plot(3), and are interpreted for various devices by commands
          described in plot(1). A graphics file is an ASCII stream of
          instruction lines.  Arguments are delimited by spaces, tabs,
          or commas.  Numbers may be floating point.  Punctuation
          marks (except `:') , spaces, and tabs at the beginning of
          lines are ignored.  Comments run from `:' to newline.  Extra
          letters appended to a valid instruction are ignored.  Thus
          `...line', `line', `li' all mean the same thing.  Arguments
          are interpreted as follows:

          1.   If an instruction requires no arguments, the rest of
               the line is ignored.

          2.   If it requires a string argument, then all the line
               after the first field separator is passed as argument.
               Quote marks may be used to preserve leading blanks.
               Strings may include newlines represented as `\n'.

          3.   Between numeric arguments alphabetic characters and
               punctuation marks are ignored.  Thus line from 5 6 to 7
               8 draws a line from (5, 6) to (7, 8).

          4.   Instructions with numeric arguments remain in effect
               until a new instruction is read.  Such commands may
               spill over many lines. Thus the following sequence will
               draw a polygon with vertices (4.5, 6.77), (5.8, 5.6),
               (7.8, 4.55), and (10.0, 3.6).

               move 4.5 6.77
               vec 5.8, 5.6 7.8
               4.55 10.0, 3.6 4.5, 6.77

          The instructions are executed in order.  The last designated
          point in a line, move, rmove, vec, rvec, arc, or point com-
          mand becomes the `current point' (X,Y) for the next command.
          Each of the following descriptions corresponds to a routine
          in plot(3).

        Open & Close
          o string  Open plotting device.  For troff, string specifies
                    the size of the plot (default is `6i.')
          cl        Close plotting device.

        Basic Plotting Commands
          e         Start another frame of output or erase the screen

     PLOT(5)                                                   PLOT(5)

                    on CRT terminals without scroll.
          m x y     (move) Current point becomes x y.
          rm dx dy  Current point becomes X+dx Y+dy.
          poi x y   Plot the point x y and make it the current point.
          v x y     Draw a vector from the current point to x y.
          rv dx dy  Draw vector from current point to X+dx Y+dy
          li x1 y1 x2 y2
                    Draw a line from x1 y1 to x2 y2. Make the current
                    point x2 y2.
          t string  Place the string so that its first character is
                    centered on the current point (default).  If
                    string begins with `\C' (`\R'), it is centered
                    (right-adjusted) on the current point.  A back-
                    slash at the beginning of the string may be
                    escaped with another backslash.
          a x1 y1 x2 y2 xc yc r
                    Draw a circular arc from x1 y1 to x2 y2 with cen-
                    ter xc yc and radius r. If the radius is positive,
                    the arc is drawn counterclockwise; negative,
                    clockwise.  The starting point is exact but the
                    ending point is approximate.
          ci xc yc r
                    Draw a circle centered at xc yc with radius r. If
                    the range and frame parameters do not specify a
                    square, the `circle' will be elliptical.
          di xc yc r
                    Draw a disc centered at xc yc with radius r using
                    the filling color (see cfill below).  Only works
                    on the 5620; on other devices is the same as
                    circle.
          bo x1 y1 x2 y2
                    Draw a box with lower left corner at x1 y1 and
                    upper right corner at x2 y2.
          sb x1 y1 x2 y2
                    Draw a solid box with lower left corner at x1 y1
                    and upper right corner at x2 y2 using the filling
                    color (see cfill below).
          par x1 y1 x2 y2 xg yg
                    Draw a parabola from x1 y1 to x2 y2 `guided' by xg
                    yg. The parabola passes through the midpoint of
                    the line joining xg yg with the midpoint of the
                    line joining x1 y1 and x2 y2 and is tangent to the
                    lines from xg yg to the endpoints.
          pol { {x1 y1 ... xn yn} ... {X1 Y1 ... Xm Ym} }
                    Draw polygons with vertices x1 y1 ... xn yn and X1
                    Y1 ... Xm Ym. If only one polygon is specified,
                    the inner brackets are not needed.
          fi { {x1 y1 ... xn yn} ... {X1 Y1 ... Xm Ym} }
                    Fill a polygon.  The arguments are the same as
                    those for pol except that the first vertex is
                    automatically repeated to close each polygon.  The
                    polygons do not have to be connected.  Enclosed

     PLOT(5)                                                   PLOT(5)

                    polygons appear as holes.
          sp { {x1 y1 ... xn yn} ... {X1 Y1 ... Xm Ym} }
                    Draw a parabolic spline guided by x1 y1 ... xn yn
                    with simple endpoints.
          fsp { {x1 y1 ... xn yn} ... {X1 Y1 ... Xm Ym} }
                    Draw a parabolic spline guided by x1 y1 ... xn yn
                    with double first endpoint.
          lsp { {x1 y1 ... xn yn} ... {X1 Y1 ... Xm Ym} }
                    Draw a parabolic spline guided by x1 y1 ... xn yn
                    with double last endpoint.
          dsp { {x1 y1 ... xn yn} ... {X1 Y1 ... Xm Ym} }
                    Draw a parabolic spline guided by x1 y1 ... xn yn
                    with double endpoints.
          csp { {x1 y1 ... xn yn} ... {X1 Y1 ... Xm Ym} }
          in filename
                    (include) Take commands from filename.
          de string { commands }
                    Define string as commands.
          ca string scale
                    Invoke commands defined as string applying scale
                    to all coordinates.

        Commands Controlling the Environment
          co string Draw lines with color string. Available colors
                    depend on the device.  String may contain defini-
                    tions for several devices separated by `/'.  Col-
                    ors possible for the various devices are:
                    pen  black, red, green, blue, Tblack, Tred,
                         Tgreen, Tblue (assumes default carousel,
                         T=thick)
                         1-8 (pen number)
                         Snumber character size as % of plotting area
                    troff
                         Ffont
                         Ppoint size
                    2621 Hcharacter for plotting

          pe string Use string as the style for drawing lines.  Not
                    all pen styles are implemented for all devices.
                    String may contain definitions for several devices
                    separated by `/'.  The available pen styles are:

                    pen  solid, dott[ed], short, long, dotd[ashed],
                         cdash, ddash
                    4014 solid , dott[ed], short, long, dotd[ashed],
                         ddash
                    troff
                         solid, dash only straight lines will be
                         dashed
                    5620 Bnumber line thickness
                    2621 Hcharacter for plotting

     PLOT(5)                                                   PLOT(5)

          cf string Color for filling; may contain the definitions for
                    several devices.  separated by `/'.  The following
                    colors are available on the specified devices:

                    pen  black, red, green, blue, Tblack, Tred,
                         Tgreen, Tblue
                         1-8 pen number
                    5620 Btexture string with octal numbers for tex-
                         ture; see types(9.5). The 16 words of texture
                         should be followed by one word for the mode
                         used by texture(); see bitblt(9.3).
                    2621 Hcharacter for filling
                    All  /Adegrees slant of shading lines
                         /Gnumber gap between shading lines (in user
                         units)

          ra x1 y1 x2 y2
                    The data will fall between x1 y1 and x2 y2. The
                    plot will be magnified or reduced to fit the
                    device as closely as possible.

                    Range settings that exactly fill the plotting area
                    with unity scaling appear below for devices sup-
                    ported by the filters of plot(1). The upper limit
                    is just outside the plotting area.  In every case
                    the plotting area is taken to be square; points
                    outside may be displayable on devices with non-
                    square faces.

                    4014      `range 0. 0. 3120. 3120.'
                    troff     `range 0. 0. 6144. 6144.'
                    2621      `range 0. 0. 22. 22.'
                    5620      range dependent on layer size
                    pen       range dependent on paper size

          fr px1 py1 px2 py2
                    Plot the data in the fraction of the display spec-
                    ified by px1 py1 for lower left corner and px2 py2
                    for upper right corner.  Thus `frame .5 0 1. .5'
                    plots in the lower right quadrant of the display;
                    `frame 0. 1. 1. 0.'  uses the whole display but
                    inverts the y coordinates.

          sa        Save the current environment, and move to a new
                    one.  The new environment inherits the old one.
                    There are 7 levels.

          re        Restore previous environment.

     SEE ALSO
          plot(1), plot(3), graph(1)