Description Usage Arguments Details Value Author(s) See Also Examples

Connects two points with an ellipsoid line and adds an arrowhead at a certain distance

1 2 3 | ```
curvedarrow(from, to, lwd = 2, lty = 1, lcol = "black",
arr.col = lcol, arr.pos = 0.5, curve = 1, dr = 0.01,
endhead = FALSE, segment = c(0, 1), ...)
``` |

`from ` |
coordinates (x,y) of the point *from* which to draw arrow. |

`to ` |
coordinates (x,y) of the point *to* which to draw arrow. |

`lwd ` |
line width. |

`lty ` |
line type. |

`lcol ` |
line color. |

`arr.col ` |
arrowhead color. |

`arr.pos ` |
relative position of arrowhead. |

`curve ` |
relative size of curve (fraction of points distance) - see details. |

`dr ` |
size of segments, in radians, to draw ellipse (decrease for smoother). |

`endhead ` |
if |

`segment ` |
if not |

`... ` |
arguments passed to function |

A curved arrow is drawn between two points '(from, to)'

The position of the arrowhead, is set with `arr.pos`

, a value between
0(start point) and 1(endpoint)

The line curvature is set with `curve`

which expresses the ellipse
radius as a fraction of the distance between the two points.
For instance, `curve=0.5`

will draw an ellepse with small radius
half of a circle.

The type of the arrowhead is set with `arr.type`

which can take
the values:

"simple" : uses comparable R function arrows.

"triangle": uses filled triangle.

"curved" : draws arrowhead with curved edges.

"circle" : draws circular head.

"ellipse" : draws ellepsoid head

"T" : draws T-shaped (blunt) head

see `Arrowhead`

from package shape for details on
arrow head

`default ` |
coordinates (x,y) where arrowhead is drawn. |

Karline Soetaert <karline.soetaert@nioz.nl>

`straightarrow`

, `segmentarrow`

,
`bentarrow`

,
`selfarrow`

, `treearrow`

, `splitarrow`

,

`arrows`

: the comparable R function,

`Arrows`

: more complicated arrow function from package
shape.

1 2 3 4 5 6 7 8 9 10 11 12 | ```
openplotmat(main = "curvedarrow")
pos <- coordinates(pos = 4, my = 0.2)
text(pos, LETTERS[1:4], cex = 2)
for (i in 1:3)
curvedarrow(from = pos[1, ] + c(0,-0.05), to = pos[i+1, ] + c(0,-0.05),
curve = 0.5, arr.pos = 1)
for (i in 1:3)
curvedarrow(from = pos[1, ] + c(0, 0.05), to = pos[i+1, ] + c(0, 0.05),
curve = -0.25, arr.adj = 1, arr.pos = 0.5,
arr.type = "triangle", arr.col = "blue")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.