Learn R Programming

phangorn (version 1.7-4)

densiTree: Plots a densiTree.

Description

An R function to plot trees similar to those produced by DensiTree.

Usage

densiTree(x, type = "cladogram", alpha = 1/length(x), consensus = NULL, optim = FALSE, scaleX = FALSE, col = 1, width = 1, cex = 0.8, ...)

Arguments

x
an object of class multiPhylo.
type
a character string specifying the type of phylogeny, so far "cladogram" (default) or "phylogram" (the default) are supported.
alpha
parameter forr semi-transparent colors.
consensus
A tree which is used to define the order of the tip labels.
optim
not yet used.
scaleX
scale trees to have identical heights.
col
edge color.
width
edge width.
cex
a numeric value giving the factor scaling of the tip labels.
...
further arguments to be passed to plot.

Details

If no concensus tree is provided densiTree computes a rooted mrp.supertree as a backbone. This should avoid too many unnecessary crossings of edges. Trees should be rooted, other wise the output may not make sense.

References

densiTree is inspired from the great DensiTree program http://www.cs.auckland.ac.nz/~remco/DensiTree/ of Remco Bouckaert.

See Also

plot.phylo, plot.networx

Examples

Run this code
data(Laurasiatherian)
set.seed(1)
bs <- bootstrap.phyDat(Laurasiatherian, FUN = function(x)upgma(dist.hamming(x)), bs=100, multicore=FALSE)
class(bs) <- 'multiPhylo'
bs = .compressTipLabel(bs)
# cladogram nice to show topological differences
densiTree(bs, optim=TRUE, type="cladogram", col="blue")
densiTree(bs, optim=TRUE, type="phylogram", col="green")
# phylogram are nice to show different age estimates
require(PhyloOrchard)
data(BinindaEmondsEtAl2007)
BinindaEmondsEtAl2007 <- .compressTipLabel(BinindaEmondsEtAl2007) 
densiTree(BinindaEmondsEtAl2007, type="phylogram", col="red")

Run the code above in your browser using DataLab