Drawing shapes
Aside from conventional plot types, it is possible to draw a selection of geometric primitives. These are
linefor lines and arrows,rectfor rectangles,ellipsefor ellipses,- and
pathfor arbitrary Bézier splines.
In addition, with
it is possible to add any content on top of the diagram.
These primitives can be especially useful since their positions (and partly also their dimensions) can be specified in
- data coordinates (using
intorfloatvalues), - or absolute coordinates (using
lengthvalues like10pt3em), or - or relative diagram coordinates (using
ratiovalues, e.g.,50%lies in the center of the diagram area), and in many cases even a combination of the above.
The Koch curve example demonstrates how to use path for drawing a fractal.