[ top | up ]

Add Arrows to a Plot

Syntax

arrows(x0, y0, x1, y1, length=0.25, angle=30,
        code=2, col, ...)

Description

arrows draws an arrow between the point (x0[i], y0[i]) and the point (x1[i],y1[i]). length gives the length of the edges of the arrow head (in inches) and angle specifies the angle from the shaft of the arrow to the edge of the arrow head. If code=2 an arrowhead is drawn at (x0[i],y0[i]) and if code=1 an arrowhead is drawn at (x1[i],y1[i]). If code=3 a head is drawn at both ends of the arrow.

col specifies a color for the arrow (col may be a vector).

Graphical parameters can also be specified as arguments.