arrows2 | R Documentation |
Draw a custom arrows between pairs of points.
arrows2( x0, y0, x1 = x0, y1 = y0, off0 = 0, off1 = off0, cex.arr = 1, cex.shr = 1, cex.hh = 1, cex.hl = 1, prophead = TRUE, twoheaded = FALSE, ... )
x0 |
the x coordinates of points from which to draw arrows. |
y0 |
the y coordinates of points from which to draw arrows. |
x1 |
the x coordinates of points to which to draw arrows. |
y1 |
the y coordinates of points to which to draw arrows. |
off0 |
offset of points from which to draw arrows. |
off1 |
offset of points to which to draw arrows. |
cex.arr |
the magnification coefficient to be used for the heights of the arrows. |
cex.shr |
the magnification coefficient to be used to change the height of arrows towards their heads. |
cex.hh |
the magnification coefficient to be used for the heights of arrows' head. |
cex.hl |
the magnification coefficient to be used for the lengths of arrows' head. |
prophead |
logical. If |
twoheaded |
logical. If |
... |
additional arguments to be passed to |
graphics::arrows()
# Example 1: plot0(c(0, 10), c(0, 10)) arrows2(1, 9, 8) arrows2(1, 8, 8, 1, cex.hh = 1.2, cex.hl = 1.2, col = "grey30", lwd = 1.2, prophead = TRUE, twoheaded = TRUE) arrows2(5, 9, 5, 1) # Example 2: plot0(c(0, 1), c(0, 1)) arrows2(runif(2), runif(2), x1 = runif(2), y1 = runif(2)) arrows2(runif(2), runif(2), x1 = runif(2), y1 = runif(2), prophead = FALSE, lty = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.