geom_th_segment: add row or column labels

View source: R/geom_th_segment.R

geom_th_segmentR Documentation

add row or column labels

Description

add row or column labels

Usage

geom_th_segment(
  mapping = NULL,
  th_data = NULL,
  name = NULL,
  subset = NULL,
  side = "left",
  nudge_x = 0,
  nudge_y = 0,
  na.rm = FALSE,
  show.legend = NA,
  inherit.aes = FALSE,
  ...
)

Arguments

mapping

Set of aesthetic mappings created by aes(). If specified and inherit.aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping.

th_data

a data frame. It should include one column named as rowLab to store the row name of the heatmap when side is left or right; otherwise, it should include one column named as colLab to store the column name of the heatmap when side is top or bottom.

name

the name of the heatmap to add row or column labels.

subset

a logical vector to specify rows or columns to add labels

side

a character value selected from left, right, top or bottom. left and right to annotate row names; top or bottom to annotate column names.

nudge_x

a value to shift the segment line horizontally.

nudge_y

a value to shift the segment line vertically.

na.rm

If FALSE, the default, missing values are removed with a warning. If TRUE, missing values are silently removed.

show.legend

logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes. It can also be a named logical vector to finely select the aesthetics to display.

inherit.aes

If FALSE, overrides the default aesthetics, rather than combining with them. This is most useful for helper functions that define both data and aesthetics and shouldn't inherit behaviour from the default plot specification, e.g. borders().

...

Other arguments passed on to layer(). These are often aesthetics, used to set an aesthetic to a fixed value, like colour = "red" or size = 3. They may also be parameters to the paired geom/stat.

Value

geom layer

Author(s)

Ruizhu Huang


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