fancyarrows | R Documentation |
Create and plot fancy arrows. Aspect ratio must be set to 1-1 for these arrows to plot correctly.
fancyarrows(x1, y1, x2, y2, thick = 0.08,
headlength = 0.4, headthick = 0.2, col = grey(0.5),
border = "black")
x1 |
x tail coordinate |
y1 |
y tail coordinate |
x2 |
x head coordinate |
y2 |
y head coordinate |
thick |
thickness of arrow |
headlength |
length of head |
headthick |
thickness of head |
col |
fill color |
border |
color of border |
Graphical side effects.
fancyarrows only work if te aspect ratio is set to 1. See example below.
Jonathan M. Lees<jonathan.lees@unc.edu>
TEACHFOC
thick = 0.01; headlength = 0.2; headthick = 0.1
x = runif(10, -1, 1)
y = runif(10, -1, 1)
############ MUST set asp=1 here
plot(x,y, asp=1)
fancyarrows(rep(0, 10) , rep(0, 10) ,x, y,
thick =thick , headlength = headlength,
headthick =headthick)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.