arrow | R Documentation |
Find coords for plotting horizontal arrows
arrow( tail, head, y, arrowLength = diff(graphics::par("usr")[1:2]) * 0.05, shaft = 0.2, point = 0.4, concat = TRUE )
tail |
x coordinate for tail of the arrow |
head |
x coordinate for the head of the arrow |
y |
y position for middle of block |
arrowLength |
arrow length in usr coords |
shaft |
half of shaft thickness in usr coords |
point |
half of arrow thickness in usr coords |
concat |
logical indicating whether to concatenate multiple arrows into one data frame separated by NAs (e.g. ready for poly) |
a data.frame with columns x and y specifying coordinates for arrows
plot(1:10) polygon(arrow(1:5,3:7*1.5,2:6)) polygon(arrow(3:6,1:4/1.5,7:10)) polygon(arrow(7:10,7:10+0:3*.1,7:10)) polygon(arrow(6:9,6:9-0:3*.1,7:10))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.