[Rd] suggest enhancement to segments and arrows to facilitate horizontal and vertical segments
Tim Hesterberg
timhesterberg at gmail.com
Fri Oct 2 17:22:34 CEST 2009
I suggest a simple enhancement to segments() and arrows() to
facilitate drawing horizontal and vertical segments --
set default values for the second x and y arguments equal to the first set.
This is handy, especially when the expressions for coordinates are long.
Compare:
Segments:
< function (x0, y0, x1 = x0, y1 = y0, col = par("fg"), lty = par("lty"),
---
> function (x0, y0, x1, y1, col = par("fg"), lty = par("lty"),
Arrows:
< function (x0, y0, x1 = x0, y1 = y0, length = 0.25, angle = 30, code = 2,
---
> function (x0, y0, x1, y1, length = 0.25, angle = 30, code = 2,
Tim Hesterberg
More information about the R-devel
mailing list