"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, ...)
"plot"(x, ...)"phylo"."phylo".tr1 to match to the tip labels in tr2. Note that not all labels in either tree need to be included; and, furthermore, one label in tr1 can be matched with more than one label in tr2, or vice versa.plot.cophylo, an object of class "cophylo" to be plotted.tipRotate, or, in the case of plot.cophylo, to the internally used tree plotting function, phylogram. phylogram takes similar arguments to plotSimmap, such as fsize, ftype, lwd, and pts, though not all options from plotSimmap and plotTree are available. If fsize is supplied as a vector, different size fonts for the left & right facing trees may be used. In addition, the optional argument scale.bar, which should be a vector containing the lengths of the scale bars desired for the right & left trees, will add scale bars to the plot when supplied to plot.cophylo."cophylo" which includes the following components or a pair of plotted facing phylogenies with links between tips as specified in assoc.
assoc, is provided, then cophylo will look for exact matches of tip labels between trees.
cophyloplot, plotSimmap
tr1<-pbtree(n=26,tip.label=LETTERS)
tr2<-pbtree(n=26,tip.label=sample(LETTERS))
obj<-cophylo(tr1,tr2)
plot(obj)
Run the code above in your browser using DataLab