geom_taxalink: link between taxa

View source: R/geom_taxalink.R

geom_taxalinkR Documentation

Description

geom_taxalink supports data.frame as input, the colour, linewidth, linetype and alpha can be mapped. When the data was provided, the mapping should be also provided, which taxa1 and taxa2 should be mapped created by aes, aes_ or aes_string. In addition, the hratio, control the height of curve line, when tree layout is cirular, default is 1. ncp, the number of control points used to draw the curve, more control points creates a smoother curve, default is 1. They also can be mapped to a column of data.

Usage

geom_taxalink(
  data = NULL,
  mapping = NULL,
  taxa1 = NULL,
  taxa2 = NULL,
  offset = NULL,
  outward = "auto",
  ...
)

Arguments

data

data.frame, The data to be displayed in this layer, default is NULL.

mapping

Set of aesthetic mappings, default is NULL.

taxa1

can be label or node number.

taxa2

can be label or node number.

offset

numeric, control the shift of curve line (the ratio of axis value, range is "(0-1)"), default is NULL.

outward

logical, control the orientation of curve when the layout of tree is circular, fan or other layout in polar coordinate, default is "auto", meaning It will automatically.

...

additional parameter.

Value

a list object.

Aesthetics

geom_taxalink() understands the following aesthethics (required aesthetics are in bold):

  • taxa1 label or node number of tree.

  • taxa2 label or node number of tree.

  • group group category of link.

  • colour control the color of line, default is black.

  • linetype control the type of line, default is 1 (solid).

  • linewidth control the width of line, default is 0.5.

  • curvature control the curvature of line, default is 0.5, it will be created automatically in polar coordinate .

  • hratio control the height of curve line, default is 1.

  • ncp control the smooth of curve line, default is 1.


GuangchuangYu/ggtree documentation built on April 12, 2024, 5:20 a.m.