geom_nodelab: geom_nodelab

View source: R/geom_nodelab.R

geom_nodelabR Documentation

geom_nodelab

Description

add node label layer for a tree

Usage

geom_nodelab(
  mapping = NULL,
  nudge_x = 0,
  nudge_y = 0,
  geom = "text",
  hjust = 0.5,
  node = "internal",
  ...
)

Arguments

mapping

aesthetic mappings, defaults to NULL

nudge_x

horizontal adjustment to nudge labels, defaults to 0

nudge_y

vertical adjustment to nudge labels, defaults to 0

geom

one of 'text', "shadowtext", 'label', 'image' and 'phylopic'

hjust

horizontal alignment, defaults to 0.5

node

a character indicating which node labels will be displayed, it should be one of 'internal', 'external' and 'all'. If it is set to 'internal' will display internal node labels, 'external' will display the tip labels, and 'all' will display internal node and tip labels.

...

additional parameters, see also the additional parameters of geom_tiplab().

Value

geom layer

Author(s)

Guangchuang Yu

References

For demonstration of this function, please refer to chapter A.4.5 of Data Integration, Manipulation and Visualization of Phylogenetic Trees http://yulab-smu.top/treedata-book/index.html by Guangchuang Yu.

See Also

geom_tiplab()


GuangchuangYu/ggtree documentation built on Oct. 31, 2024, 10:10 a.m.