PLOT(6)PLOT(6)

## NAME

plot – graphics interface

## DESCRIPTION

Files of this format are interpreted by
*plot*(1)*plot*`:`)`:``...line`,`line`,`and``li`

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

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`.

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).

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 ,`point`*X,Y*)

### Open & Close

`o`

*string*

Open plotting device.
For
*troff*,*string*`6i`).

`cl`

Close plotting device.

### Basic Plotting Commands

`e`

Start another frame of output.

`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 *

`v`

*x y*

Draw a vector from the current point to
*x y. *

`rv`

*dx dy*

Draw vector from current point to
*+*dx*+*dy

`li`

*x1 y1 x2 y2*

Draw a line from
*x1 y1 **x2 y2. **x2 y2. *

`t`

*string*

Place the
*string**string*`\C``\R`),

`a`

*x1 y1 x2 y2 xc yc r*

Draw a circular arc from
*x1 y1 **x2 y2 **xc yc **r*.

`ci`

*xc yc r*

Draw a circle centered at
*xc yc **r*.

`di`

*xc yc r*

Draw a disc centered at
*xc yc **r*`cfill`

`bo`

*x1 y1 x2 y2*

Draw a box with lower left corner at
*x1 y1 **x2 y2. *

`sb`

*x1 y1 x2 y2*

Draw a solid box with lower left corner at
*x1 y1 **x2 y2 *`cfill`

`par`

*x1 y1 x2 y2 xg yg*

Draw a parabola from
*x1 y1 **x2 y2 **xg yg. **xg yg **x1 y1 **x2 y2 **xg yg *

`pol { {`

*x1 y1 ... xn yn*

`} ...`

*{ X1 Y1 ... Xm Ym} }*

Draw polygons with vertices
*x1 y1 ... xn yn **X1 Y1 ... Xm Ym. *

`fi { {`

*x1 y1 ... xn yn*

`} ...`

*{ X1 Y1 ... Xm Ym} }*

Fill a polygon.
The arguments are the same as those for
`pol`

`sp { {`

*x1 y1 ... xn yn*

`} ...`

*{ X1 Y1 ... Xm Ym*

`} }`Draw a parabolic spline guided by
*x1 y1 ... xn yn *

`fsp { {`

*x1 y1 ... xn yn*

`} ...`

*{ X1 Y1 ... Xm Ym*

`} }`Draw a parabolic spline guided by
*x1 y1 ... xn yn *

`lsp { {`

*x1 y1 ... xn yn*

`} ...`

*{ X1 Y1 ... Xm Ym*

`} }`Draw a parabolic spline guided by
*x1 y1 ... xn yn *

`dsp { {`

*x1 y1 ... xn yn*

`} ...`

*{ X1 Y1 ... Xm Ym*

`} }`Draw a parabolic spline guided by
*x1 y1 ... xn yn *

`csp { {`

*x1 y1 ... xn yn*

`} ...`

*{ X1 Y1 ... Xm Ym*

`} }`

`in`

*filename*

(include) Take commands from
*filename*.

`de`

*string*

`{ commands`

*}*

Define
*string**commands*.

`ca`

*string scale*

Invoke commands defined as
*string**scale*

### Commands Controlling the Environment

`co`

*string*

Use color given by first character of
*string*,`red`,`yellow`,`green`,`blue`,`cyan`,`magenta`,`white`,`kblack`.

`pe`

*string*

Use
*string*`solid`,`dott`[ed],`short`,`long`,`dotd`[ashed]`,``cdash`,`ddash`

`cf`

*string*

Color for filling (see
`co`,

`ra`

*x1 y1 x2 y2*

The data will fall between
*x1 y1 **x2 y2. *

Range settings that exactly fill the plotting area
with unity scaling appear below for
devices supported by the filters of
*plot*(1).

`fr`

*px1 py1 px2 py2*

Plot the data in the fraction of the display
specified by
*px1 py1 **px2 py2 *`frame .5 0 1. .5``frame 0. 1. 1. 0.`*y*

`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.