gline([ptspec1, ptspec2, ...]).
A PTSPEC is a list containing commands from the following list:
absdata(x, y) — Absolute data coordinates. (Transformations set by xtransform and ytransform are applied.) reldata(dx, dy) — Relative data coordinates. (This ignores those transformations.)
abspaper(x, y) — Absolute paper coordinates (in mm or pt)
relpaper(dx, dy) — Relative data coordinates (in mm or pt)
rotdata(dx, dy) — Rotate by tan⁻¹(dy/dx) in data space. (This affects subsequent relative positioning.)
rotpaper(rad=angle) — Rotate counterclockwise by given angle in radians. (This affects subsequent relative positioning.)
rotpaper(deg=angle) — Rotate by given angle in degrees, ditto.
retract(l) — Retract preceding and following segments by L pt.
retract(l1, l2) — Retract preceding and following segments by L1 and L2 pt respectively.
at(anc) — Absolute paper coordinates of location set by at. atx(anc) — Absolute paper x-coordinate of location set by at. aty(anc) — Absolute paper y-coordinate of location set by at. For instance,
gline([[AbsData(0, 1), RelPaper(5, 0)], [AbsData(2, 3), RelPaper(0, 7)]])
draws a line from 5 mm to the right of the point (0, 1) in the graph to 7 mm below the point (2, 3) in the graph.
Note that paper y-coordinates increase toward the bottom of the graph while data y-coordinates increase toward the top.
Note: The rather cumbersome syntax of
gline makes
line and
plot more attractive for general usage. The same applies to
gpoly versus
fill and
poly.