Arrowhead {shape}R Documentation

adds arrowheads to a plot

Description

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

Usage

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, 
  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 "simple","curved","triangle","circle"
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
npoint only if arr.type = "curved": number of points to draw the curve; increase for smoother arrowheads

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 <k.soetaert@nioo.knaw.nl>

See Also

Arrows

Examples

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))

[Package shape version 1.2.1 Index]