Arrowhead: adds arrowheads to a plot

Description Usage Arguments Details Author(s) See Also Examples

View source: R/Arrowhead.R

Description

adds one or more arrowheads to a plot; shape is either curved, a triangle, a circle or ellipse.

Usage

1
2
3
4
Arrowhead(x0, y0, angle = 0, arr.length = 0.4, 
          arr.width = arr.length/2, arr.adj = 0.5, 
          arr.type = "curved", lcol = "black", lty = 1, 
          arr.col = lcol, arr.lwd = 2, npoint = 5, ...)

Arguments

x0

x-coordinates of points at which to draw arrowhead; either one value or a vector.

y0

y-coordinates of points at which to draw arrowhead; either one value or a vector.

angle

angle of arrowhead (anti-clockwise, relative to x-axis), in degrees [0,360]; either one value or a vector.

arr.length

approximate length of arrowhead, in cm; either one value or a vector.

arr.width

approximate width of arrowhead, in cm; either one value or a vector.

arr.adj

0,0.5,1 specifying the adjustment of the arrowhead.

arr.type

type of arrowhead to draw, one of "curved", "triangle", "circle", "ellipse".

lcol

line color specifications; either one value or a vector.

lty

line type specifications; either one value or a vector.

arr.col

color of arrowhead; either one value or a vector.

arr.lwd

line width of arrowhead.

npoint

only if arr.type = "curved": number of points to draw the curve; increase for smoother arrowheads

...

arguments passed to the polygon function.

Details

x0, y0, angle, arr.length, arr.width, lcol, lty and arr.col can be a vector, of the same length.

The type of the arrowhead is set with arr.type which can take the values:

Author(s)

Karline Soetaert <karline.soetaert@nioz.nl>

See Also

Arrows

Examples

1
2
3
4
5
6
7
8
emptyplot(main = "Arrowhead")
Arrowhead(x0 = runif(10), y0 = runif(10), angle = runif(10)*360, 
          arr.length = 0.3, arr.type = "circle", arr.col = "green")
Arrowhead(x0 = runif(10), y0 = runif(10), angle = runif(10)*360, 
          arr.length = 0.4, arr.type = "curved", arr.col = "red")
Arrowhead(x0 = runif(10), y0 = runif(10), angle = runif(10)*360, 
          arr.length = runif(10), arr.type = "triangle", 
          arr.col = rainbow(10))

Example output



shape documentation built on May 19, 2021, 9:09 a.m.

Related to Arrowhead in shape...