geom_tiplab: geom_tiplab

Description Usage Arguments Value Author(s) Examples

View source: R/geom_tiplab.R

Description

add tip label layer

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
geom_tiplab(
  mapping = NULL,
  hjust = 0,
  align = FALSE,
  linetype = "dotted",
  linesize = 0.5,
  geom = "text",
  offset = 0,
  as_ylab = FALSE,
  ...
)

Arguments

mapping

aes mapping

hjust

horizontal adjustment

align

align tip lab or not, logical

linetype

linetype for adding line if align = TRUE

linesize

line size of line if align = TRUE

geom

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

offset

tiplab offset

as_ylab

display tip labels as y-axis label, only works for rectangular and dendrogram layouts

...

additional parameter

Value

tip label layer

Author(s)

Guangchuang Yu

Examples

1
2
3
require(ape)
tr <- rtree(10)
ggtree(tr) + geom_tiplab()

Example output

Loading required package: ggplot2
Loading required package: treeio
ggtree v1.8.2  For help: https://guangchuangyu.github.io/ggtree

If you use ggtree in published research, please cite:
Guangchuang Yu, David Smith, Huachen Zhu, Yi Guan, Tommy Tsan-Yuk Lam. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. Methods in Ecology and Evolution 2017, 8(1):28-36, doi:10.1111/2041-210X.12628
Loading required package: ape

Attaching package: 'ape'

The following object is masked from 'package:ggtree':

    rotate

The following objects are masked from 'package:treeio':

    Nnode, Ntip, drop.tip

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