gline([ptspec1, ptspec2, ...]).
A PTSPEC is a list containing commands from the following list:
absdata(x, y) — Absolute data coordinates. (This respects the transformation set by xtransform and ytransform.) reldata(dx, dy) — Relative data coordinates. (This does not respect those transformations.)
abspaper(x, y) — Absolute paper coordinates (in pt)
relpaper(dx, dy) — Relative data coordinates (in pt)
rotdata(xi, eta) — Rotate by atan2(eta, xi) in data space. (This affects subsequent relative positioning.)
rotpaper(phi) — Rotate by phi radians. (This affects subsequent relative positioning.)
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(id) — Absolute paper coordinates of location set by at. atx(id) — Absolute paper x-coordinate of location set by at. aty(id) — 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 pt to the right of the point (0, 1) in the graph to 7 pt 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.