Draw arrows between pairs of points.
Generalizes graphics::arrows
to allow all arguments to be
vectors. (As of R 3.1.0, only the first component of the
length
argument is used by graphics::arrows
; others are
ignored without a warning.)
Arrows(x0, y0, x1 = x0, y1 = y0, length = 0.25, angle = 30, code = 2, col = par("fg"), lty = par("lty"), lwd = par("lwd"), warnZeroLength=FALSE, ...)
1. Put all arguments in a data.frame
to force them to shared
length.
2. Call arrows
once for each row.
Spencer Graves
## ## 1. Simple example: ## 3 arrows, the first with length 0 is suppressed ## plot(1:3, type='n') Arrows(1, 1, c(1, 2, 2), c(1, 2:3), col=1:3, length=c(1, .2, .6)) ## ## 2. with an NA ## plot(1:3, type='n') Arrows(1, 1, c(1, 2, 2), c(1, 2, NA), col=1:3, length=c(1, .2, .6))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.