ggtree_th: The tree visualization

View source: R/ggtree_th.R

ggtree_thR Documentation

The tree visualization

Description

This

Usage

ggtree_th(
  tr,
  mapping = NULL,
  layout = "rectangular",
  open.angle = 0,
  mrsd = NULL,
  as.Date = FALSE,
  yscale = "none",
  yscale_mapping = NULL,
  ladderize = TRUE,
  right = FALSE,
  branch.length = "branch.length",
  root.position = 0,
  node = NULL,
  scale_x = 1,
  scale_y = 1,
  ...
)

Arguments

tr

phylo object

mapping

aesthetic mapping

layout

one of 'rectangular', 'dendrogram', 'slanted', 'ellipse', 'roundrect', 'fan', 'circular', 'inward_circular', 'radial', 'equal_angle', 'daylight' or 'ape'

open.angle

open angle, only for 'fan' layout

mrsd

most recent sampling date

as.Date

logical whether using Date class in time tree

yscale

y scale

yscale_mapping

yscale mapping for category variable

ladderize

logical (default TRUE). Should the tree be re-organized to have a 'ladder' aspect?

right

logical. If ladderize = TRUE, should the ladder have the smallest clade on the right-hand side? See ape::ladderize() for more information.

branch.length

variable for scaling branch, if 'none' draw cladogram

root.position

position of the root node (default = 0)

node

Nodes to specify clades for zoom-in

scale_x

A numeric vector to scale clades horizontally. It should have length equal to 1 or the same length as node.

scale_y

A numeric vector to scale clades vertically. It should have length equal to 1 or the same length as node.

...

additional parameter

some dot arguments:

  • nsplit integer, the number of branch blocks divided when 'continuous' is not "none", default is 200.

Value

ggtree

Author(s)

Ruizhu Huang

Examples

library(ggtree)
set.seed(1)
rt <- ape::rtree(200)

#ggtree_th(rt, branch.length = "none", node = c(280, 320),
#                  scale_y = 8, scale_x = c(2, 1.75)) +
#    geom_hilight(node = 280, fill = "red", alpha = 0.5) +
#    geom_hilight(node = 320, fill = "blue", alpha = 0.5)

fionarhuang/TreeHeatmap documentation built on Feb. 1, 2024, 7:30 a.m.