geom_balance | R Documentation |
highlights the two direct descendant clades of an internal node
geom_balance(
node,
fill = "steelblue",
color = "white",
alpha = 0.5,
extend = 0,
extendto = NULL
)
node |
selected node (balance) to highlight its two direct descendant |
fill |
color to fill in the highlight rectangle, default to "steelblue" |
color |
color to outline highlight rectangle and divide balance, defaults to "white" |
alpha |
alpha (transparency) for the highlight rectangle, defaults to 0.5 |
extend |
extend xmax of the highlight rectangle by the value of extend |
extendto |
extend xmax of the highlight rectangle to the value of extendto |
Particularly useful when studying neighboring clades. Note that balances that correspond to multichotomies will not be displayed.
ggplot2
Justin Silverman and modified by Guangchuang Yu
J. Silverman, et al. A phylogenetic transform enhances analysis of compositional microbiota data. (in preparation)
For more detailed demonstration, please refer to chapter 5.2.2 of Data Integration, Manipulation and Visualization of Phylogenetic Trees http://yulab-smu.top/treedata-book/index.html by Guangchuang Yu.
library(ggtree)
set.seed(123)
tr<- rtree(15)
x <- ggtree(tr)
x + geom_balance(17)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.