Arrows | R Documentation |
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, ...)
x0, y0, x1, y1, length, angle,
code, col, lty, lwd, ... |
as for |
warnZeroLength |
Issue a warning for zero length arrow? |
1. Put all arguments in a data.frame
to force them to shared
length.
2. Call arrows
once for each row.
Spencer Graves
arrows
## ## 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.