View source: R/plotBranchbyTrait.R
plotBranchbyTrait | R Documentation |
Function plots a tree with branches colored by the value for a quantitative trait or probability, by various methods.
plotBranchbyTrait(tree, x, mode=c("edges","tips","nodes"), palette="rainbow",
legend=TRUE, xlims=NULL, ...)
tree |
an object of class |
x |
either a vector of states for the edges, tips, or nodes of the tree (for |
mode |
string indicating plotting mode. |
palette |
color palette to translate character values to color. Options are presently |
legend |
can be a logical value ( |
xlims |
range for the translation map between trait values and the color map. Should be inclusive of all the values in |
... |
other optional arguments to be passed to |
Unlike most other tree plotting functions in phytools, this function calls plot.phylo
(not plotSimmap
) internally.
Note that if prompt=TRUE
, the function will prompt for the position of the legend.
Plots a phylogeny.
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.