Make fancy arrows

Share:

Description

Create and plot fancy arrows. Aspect ratio must be set to 1-1 for these arrows to plot correctly.

Usage

1
2
3
fancyarrows(x1, y1, x2, y2, thick = 0.08,
     headlength = 0.4, headthick = 0.2, col = grey(0.5),
     border = "black")

Arguments

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

Value

Graphical side effects.

Note

fancyarrows only work if te aspect ratio is set to 1. See example below.

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

See Also

TEACHFOC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
   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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.