View source: R/clade-functions.R
scaleClade | R Documentation |
zoom out/in a selected clade to emphasize or de-emphasize it
scaleClade(tree_view = NULL, node, scale = 1, vertical_only = TRUE)
tree_view |
tree view (i.e. the ggtree object). If tree_view is NULL, the last ggplot object will be used. |
node |
internal node number to specify a clade. If NULL, using the whole tree |
scale |
the scale of the selected clade. The clade will be zoom in when scale > 1, and will be zoom out when scale < 1 |
vertical_only |
logical. If TRUE (default), only vertical will be scaled. If FALSE, the clade will be scaled vertical and horizontally. |
tree view
Guangchuang Yu
x <- rtree(15)
p <- ggtree(x) + geom_tiplab() +
geom_nodelab(aes(subset=!isTip, label=node), hjust = -.1, color = "red")
scaleClade(p, 24, scale = .1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.