Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

inset

geom_inset


Description

add subplots to tree

add insets in a tree

Usage

geom_inset(
  insets,
  width = 0.1,
  height = 0.1,
  hjust = 0,
  vjust = 0,
  x = "node",
  reverse_x = FALSE,
  reverse_y = FALSE
)

inset(
  tree_view,
  insets,
  width,
  height,
  hjust = 0,
  vjust = 0,
  x = "node",
  reverse_x = FALSE,
  reverse_y = FALSE
)

Arguments

insets

a list of ggplot objects, named by node number

width

width of inset, relative to the range of x-axis

height

height of inset, relative to the range of y-axis

hjust

horizontal adjustment

vjust

vertical adjustment

x

x position, one of 'node' and 'branch'

reverse_x

whether x axis was reversed by scale_x_reverse

reverse_y

whether y axis was reversed by scale_y_reverse

tree_view

tree view

Value

inset layer

tree view with insets

Author(s)

Guangchuang Yu

Guangchuang Yu


ggtree

an R package for visualization of tree and annotation data

v2.4.2
Artistic-2.0
Authors
Guangchuang Yu [aut, cre, cph] (<https://orcid.org/0000-0002-6485-8781>), Tommy Tsan-Yuk Lam [aut, ths], Shuangbin Xu [aut] (<https://orcid.org/0000-0003-3513-5362>), Yonghe Xia [ctb], Justin Silverman [ctb], Bradley Jones [ctb], Watal M. Iwasaki [ctb], Ruizhu Huang [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.