label_pad {ggtree}R Documentation

Padding taxa labels

Description

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

Usage

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

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

[Package ggtree version 2.4.2 Index]