scaleClade: scaleClade

View source: R/clade-functions.R

scaleCladeR Documentation

scaleClade

Description

zoom out/in a selected clade to emphasize or de-emphasize it

Usage

scaleClade(tree_view = NULL, node, scale = 1, vertical_only = TRUE)

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

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.

Value

tree view

Author(s)

Guangchuang Yu

Examples

x <- rtree(15)
p <- ggtree(x) + geom_tiplab() +
  geom_nodelab(aes(subset=!isTip, label=node), hjust = -.1, color = "red")
scaleClade(p, 24, scale = .1)

YuLab-SMU/ggtree documentation built on Nov. 3, 2024, 4:15 p.m.