Learn R Programming

phytools (version 0.5-38)

plotTree.wBars: Plot a tree with bars at the tips

Description

Function plots a phylogeny in phylogram or fan style with bars at the tips representing the values for a phenotypic trait.

Usage

plotTree.wBars(tree, x, scale=1, width=NULL, type="phylogram", method="plotTree", tip.labels=FALSE, col="grey", border=NULL, ...)

Arguments

tree
an object of class "phylo".
x
a named vector of trait values (normally > 0).
scale
scaling factor for the tip bars (relative to the total tree height).
width
width of the tip bars.
type
plot type. Can be "phylogram" or "fan".
method
plotting method to use. Can be "plotTree" (for plotTree) or "plotSimmap" (for plotSimmap).
tip.labels
argument indicating whether or not tip labels should be plotted. Defaults to tip.labels=FALSE.
col
colors of the plotted bars. Can be a single value or a vector with length equal to the number of tips in the tree.
border
single value specifying the color of the border for the plotted bars. Defaults to border=NULL, which means that black borders will be plotted.
...
optional arguments to be passed to codeplotTree or plotSimmap.

Value

Plots a tree.

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also

plotSimmap, plotTree