zoomClade: zoomClade

View source: R/clade-functions.R

zoomCladeR Documentation

zoomClade

Description

zoom in on a selected clade of a tree, while showing its on the full view of tree as a seperated panel for reference

Usage

zoomClade(tree_view = NULL, node, xexpand = NULL)

Arguments

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

xexpand

numeric, expend the xlim of the zoom area. default is NULL.

Value

full tree with zoom in clade

Author(s)

Guangchuang Yu

Examples

## Not run: 
x <- rtree(15)
p <- ggtree(x) + geom_tiplab() +
  geom_nodelab(aes(subset=!isTip, label=node), hjust = -.1, color = "red")
zoomClade(p, 21, xexpand = .2)

## End(Not run)

GuangchuangYu/ggtree documentation built on April 12, 2024, 5:20 a.m.