Next: Coordinate Grids
Up: High-Level Picture Elements
Previous: Arrows
Contents
Index
A coordinate axis consists of a line between two points together with
a specified number of regularly-spaced tick marks:
h_axis(p1, p2, n); // n subintervals (n+1 ticks)
v_axis(p1, p2, n);
The style of tick mark is appropriate for an axis of the given type.
If the endpoints are omitted, they default to
and
for a horizontal axis, or to
and
for a vertical
axis. If the bounding box has integer width and/or
height, then omitting the number of points draws tick marks one unit
apart.
Labels for a horizontal axis are generated with:
h_axis_labels(P p1, P p2, int n, P offset, [alignment]);
This puts
evenly-spaced labels on the segment joining
p1 and p2. The labels are automatically generated to
match their horizontal location. As for ordinary labels, the
offset is in pt, and the optional LATEX-style alignment
option places the labels using their corners rather than their
reference points. Labels for a vertical axis are generated in
the obvious way.
As for coordinate axes, the initial and final points may be omitted in
an axis_label command, with the same defaults. However, the
offset and number of labels must always be specified.
Next: Coordinate Grids
Up: High-Level Picture Elements
Previous: Arrows
Contents
Index
Andrew D. Hwang
2004-09-04