add_strip: add strips for a tree plot

add_stripR Documentation

add strips for a tree plot

Description

add strips for a tree plot

Usage

add_strip(trp, some_tax, flat_n = 5, strip_params = NULL)

Arguments

trp

tree plot from ggtree

some_tax

some tax you want to add strip

flat_n

flat the text when taxa number more than flat_n.

strip_params

parameters parse to geom_strip

Value

tree plot

Examples


data(otutab, package = "pcutils")
# run yourself
if (interactive()) {
  ann_tree(taxonomy, otutab) -> tree
  easy_tree(tree) -> p
  some_tax <- table(taxonomy$Phylum) %>%
    sort(decreasing = TRUE) %>%
    head(5) %>%
    names()
  add_strip(p, some_tax)
}


pctax documentation built on May 29, 2024, 10:03 a.m.