cophylo | R Documentation |
Visualize co-phylogenetic trees by multiple methods.
cophylo(tr1, tr2, assoc=NULL, rotate=TRUE, ...)
## S3 method for class 'cophylo'
plot(x, ...)
cotangleplot(tr1, tr2, type=c("cladogram","phylogram"),
use.edge.length=TRUE, tangle=c("both","tree1","tree2"), ...)
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 |
type |
for |
use.edge.length |
for |
tangle |
for |
... |
optional arguments to be passed to |
cophylo
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.
If no matrix of associations, assoc
, is provided, then cophylo
will look for exact matches of tip labels between trees.
cotangleplot
creates a co-phylogenetic plot in which the edges of the matched trees are crossing and is designed to be used only on phylogenies with matching tip labels.
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. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.
cophyloplot
, plotSimmap
## 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.