Creates a co-phylogenetic plot
This function creates an object of class "cophylo" or, in the case of plot.cophylo, plots that object. The function can (optionally) first attempt to rotate the nodes of both trees to optimize vertical matching of tips.
cophylo(tr1, tr2, assoc=NULL, rotate=TRUE, ...) ## S3 method for class 'cophylo' plot(x, ...)
tr1 |
object of class |
tr2 |
object of class |
assoc |
matrix containing the tip labels in |
rotate |
logical argument indicating whether nodes on both trees should be rotated to attempt to match in vertical position. |
x |
in the case of |
... |
optional arguments to be passed to |
If no matrix of associations, assoc, is provided, then cophylo will look for exact matches of tip labels between trees.
An object of class "cophylo" which includes the following components or a pair of plotted facing phylogenies with links between tips as specified in assoc.
Liam Revell liam.revell@umb.edu
Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.
## load data from Lopez-Vaamonde et al. (2001)
data(wasp.trees)
data(wasp.data)
## create co-phylogenetic object
wasp.cophylo<-cophylo(wasp.trees[[1]],wasp.trees[[2]],
assoc=wasp.data)
## plot co-phylogenies
plot(wasp.cophylo,link.type="curved",link.lwd=4,
link.lty="solid",link.col=make.transparent("red",
0.25))
par(mar=c(5.1,4.1,4.1,2.1))Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.