Search

Ploticus >
Scripts >

**proc line** may be used to draw arbitrary lines in scaled space or absolute space.
It is typically used for annotations, etc.
To plot a line or curve from data, see
proc lineplot.
See also
proc drawcommands.

### Attributes

The points attribute **must** be specified.

**points**
multiline-text

A list of points. One or more lines. Ends at first empty (blank) line.
Each line may have one coordinate pair or two. If **two**, the
first point is the beginning of a line, and the second point is the end
of a line. If **one**, the point is taken as a continuation of line
from previous point.

Example 1:

points: 1.0 3.0 1.0 4.5
3.0 4.5
3.0 3.0

Example 2:
With locval notation (the default), you can do things like this:
points: min 0(s) max 0(s)

More info on locval notation

**notation**
absolute | scaled | locval

Specifies whether points are to be taken as locations in absolute
space, scaled space, or
location values.
Default is locval.

Example: notation: scaled

**linedetails**
linedetails

Details controlling the rendering of the line.

Example: linedetails: width=3 color=green

**anchor**
x y

If specified, the points still specifies how the lines are to be drawn, but
lines are drawn relative to *x, y*.
*x* and *y* should be in absolute space.
Does not work for values in scaled space, so notation should be absolute
or locval with no (s) values.
This can be used to specify elaborate sets of points once, then render the figure
multiple times in different locations. Versions 2.31+

The following example draws a 1" square in two locations:

#proc line
#saveas D1
anchor: 2 3
points: 0 0 0 1
1 1
1 0
0 0
#proc line
#clone D1
anchor: 4 4