19 Arrows

class arrow.T
Arrow is an optional component of a chart that draws line segments with an arrowhead. To draw an arrow, one creates an arrow.T object, and calls its "draw" method usually after area.draw() is called (otherwise, area.draw() may overwrite the arrow). For example, the below code draws an arrow from (10,10) to (20,30).

ar = area.T(...)
a = arrow.T(head_style = 1)
ar.draw()
a.draw([(10,10), (20,30)])

This class supports the following attributes:

head_color
Type: color.T ( see Section 15) Default: color.black.

The color of the arrow head.

head_len
Type: length in points (
xrefunit) Default: 8.

The length of the arrow head.

head_style
Type: int Default: 1.

The value of 0 draws a triangular arrow head. The value of 1 draws a swallow-tail arrow head. The value of 2 draws a circular head. The value of 3 draws a diamond-shaped head.

line_style
Type: line_style.T ( see Section 14) Default: line_style.black.

Line style.

thickness
Type: length in points (
xrefunit) Default: 4.

The width of the arrow head.

An arrow object exports a single public method, draw.

draw( points)
Parameter points specifies the list of points the arrow traverses through. It should contain at least two points, i.e., the tail and tip. Parameter can is an optional parameter that specifies the output. See Section 21

Image arrows