Usage
plotBranchbyTrait(tree, x, mode=c("edges","tips","nodes"), palette="rainbow",
legend=TRUE, xlims=NULL, ...)
Arguments
tree
an object of class "phylo".
x
either a vector of states for the edges, tips, or nodes of the tree (for mode="edges"
, "tips"
, and "nodes"
, respectively).
mode
string indicating plotting mode. mode="edges"
, the default, requires that the mapping state of each edge in the tree should be provided. mode="tips"
takes the tip values and estimates the state at each internal node. The mapped c
palette
color palette to translate character values to color. Options are presently "rainbow"
(the default), "heat.colors"
, and "gray"
.
legend
can be a logical value (TRUE
or FALSE
) or a numeric value greater than 0. In the latter case the numeric value gives the length of the plotted legend, which also acts as a scale bar for the branch lengths of the tree.
xlims
range for the translation map between trait values and the color map. Should be inclusive of all the values in x
.
...
other optional arguments to be passed to plot.phylo
.