]> git.donarmstrong.com Git - ape.git/blob - man/edges.Rd
new code for reading FASTA files
[ape.git] / man / edges.Rd
1 \name{edges}
2 \alias{edges}
3 \alias{fancyarrows}
4 \title{Draw Additional Edges on a Plotted Tree}
5 \description{
6   \code{edges} draws edges on a plotted tree. \code{fancyarrows}
7   enhances \code{\link[graphics]{arrows}} with triangle and harpoon
8   heads; it can be called from \code{edges}.
9 }
10 \usage{
11 edges(nodes0, nodes1, arrows = 0, type = "classical", ...)
12 fancyarrows(x0, y0, x1, y1, length = 0.25, angle = 30, code = 2,
13             col = par("fg"), lty = par("lty"), lwd = par("lwd"),
14             type = "triangle", ...)
15 }
16 \arguments{
17   \item{nodes0, nodes1}{vectors of integers giving the tip and/or node
18     numbers where to start and to end the edges (eventually recycled).}
19   \item{arrows}{an integer between 0 and 3; 0: lines (the default); 1:
20     an arrow head is drawn at \code{nodes0}; 2: at \code{nodes1}; 3:
21     both.}
22   \item{type}{if the previous argument is not 0, the type of arrow head:
23     \code{"classical"} (just lines, the default), \code{"triangle"},
24     \code{"harpoon"}, or any unambiguous abbreviations of these. For
25     \code{fancyarrows} only the last two are available.}
26   \item{x0, y0, x1, y1}{the coordinates of the start and end points for
27     \code{fancyarrows} (these are not recycled and so should be vectors
28     of the same length).}
29   \item{length, angle, code, col, lty, lwd}{default options similar to
30     those of \code{\link[graphics]{arrows}}.}
31   \item{\dots}{further arguments passed to \code{\link[graphics]{segments}}.}
32 }
33 \details{
34   The first function is helpful when drawing reticulations on a phylogeny,
35   especially if computed from the edge matrix.
36 }
37 \author{Emmanuel Paradis}
38 \seealso{
39   \code{\link{plot.phylo}}, \code{\link{nodelabels}}
40 }
41 \examples{
42 set.seed(2)
43 tr <- rcoal(6)
44 plot(tr, "c")
45 edges(10, 9, col = "red", lty = 2)
46 edges(10:11, 8, col = c("blue", "green")) # recycling of 'nodes1'
47 edges(1, 2, lwd = 2, type = "h", arrows = 3, col = "green")
48 nodelabels()
49 }
50 \keyword{aplot}