label_pad: Padding taxa labels

Description Usage Arguments Value Author(s) References Examples

View source: R/geom_tiplab.R

Description

This function add padding character to the left side of taxa labels.

Usage

1
label_pad(label, justify = "right", pad = "ยท")

Arguments

label

taxa label

justify

should a character vector be left-justified, right-justified (default), centred or left alone.

pad

padding character (default is a dot)

Value

Taxa labels with padding characters added

Author(s)

Guangchuang Yu and Yonghe Xia

References

https://groups.google.com/g/bioc-ggtree/c/INJ0Nfkq3b0/m/lXefnfV5AQAJ

Examples

1
2
3
4
5
library(ggtree)
set.seed(2015-12-21)
tree <- rtree(5)
tree$tip.label[2] <- "long string for test"
label_pad(tree$tip.label)

ggtree documentation built on Nov. 15, 2020, 2:09 a.m.