FIGURE command

Syntax: FIGURE ARROW style nheads x1 y1 x2 y2
FIGURE RECTANGLE x1 y1 x2 y2
FIGURE TRIANGLE x1 y1 x2 y2 x3 y3
FIGURE ELLIPSE x1 y1 x2 y2
Qualifiers: \WORLD, \GRAPH, \PERCENT
Defaults: \WORLD

This command is used to draw geometric figures. The figure type is chosen with the keyword (ARROW, RECTANGLE, TRIANGLE, or ELLIPSE).

Fillable figures

The figures are fillable, except for style 3 arrows. The AREAFILLCOLOR characteristic controls the fill color. Set it before drawing the figure.

Units

The numeric location parameters may be expressed in three types of units, which are chosen by command qualifier. The default is /WORLD.

qualifier
Interpretation of the coordinates
\WORLD centimeters
\PERCENT percentages of the current window, as chosen with the WINDOW command.
\GRAPH graph units, that is, the units defined by the minimum and maximum values for the last graph drawn in the active window. If no graph has been drawn yet, the defaults are -1 ≤ x ≤ 1 and -1 ≤ y ≤ 1

For example, if the \PERCENT qualifier is used, then a location of (50,50) represents the center of the active window. If the \WORLD qualifier is used, the coordinates are in units of the world coordinate system, the plotting units. The default world coordinate system units are centimeters.

Arrows

Syntax: FIGURE ARROW style nheads x1 y1 x2 y2

The FIGURE ARROW command draws an arrow with base at (x1,y1) and end point at (x2,y2).

There are three styles of arrow:

The parameter nheads can be either 1, for single headed arrows, or 2, for arrows with heads on both ends.

Rectangles

Syntax: FIGURE RECTANGLE x1 y1 x2 y2

The FIGURE RECTANGLE command draws a rectangle with one corner at (x1,y1) and the opposite corner at (x2,y2).

Triangles

Syntax: FIGURE RECTANGLE x1 y1 x2 y2 x3 y3

The FIGURE TRIANGLE command draws a triangle with corners at (x1,y1), (x2,y2), and (x3,y3).

Rectangles

Syntax: FIGURE ELLIPSE x1 y1 x2 y2

The FIGURE ELLIPSE command draws the ellipse which fits within the rectangle with one corner at (x1,y1) and the opposite corner at (x2,y2).