hmanno {ggalign}R Documentation

Determine the active context of heatmap layout

Description

Determine the active context of heatmap layout

Usage

hmanno(
  position = NULL,
  size = NULL,
  width = NULL,
  height = NULL,
  guides = NA,
  free_labs = NA,
  free_spaces = NA,
  plot_data = NA,
  theme = NULL,
  what = waiver()
)

Arguments

position

Which heatmap annotation should get activated? Possible values are follows:

  • A string of "top", "left", "bottom", or "right".

  • NULL: means set the active context into the heatmap itself.

size

A unit object to set the total size of the heatmap annotation. This will only be used if what is a string of "top", "left", "bottom", or "right".

  • If position is "top" or "bottom", size set the total height of the annotation.

  • If position is "left" or "right", size set the total width of the annotation.

width, height

Heatmap body width/height, can be a unit object. Only used when position is NULL.

guides

A boolean value or a string containing one or more of "t","l","b",and "r" indicates Which guide should be collected. If NULL, no guides will be collected. Default: "tlbr".

free_labs

A boolean value or a string containing one or more of "t","l","b",and "r" indicates which axis title should be free from alignment. If NULL, all axis title will be aligned. Default: "tlbr".

free_spaces

A character specifies the ggplot elements which won't count space sizes when alignment. If NULL (default), no space will be removed. See free_space() for allowed values.

plot_data

A function used to transform the plot data before rendering. By default, it'll inherit from the parent layout. If no parent layout, the default is to not modify the data. Use NULL, if you don't want to modify anything.

Used to modify the data after layout has been created, but before the data is handled of to the ggplot2 for rendering. Use this hook if the you needs change the default data for all geoms.

theme

A theme() object to rendering the guides, title, subtitle, caption, margins and background. Only used when position is NULL.

what

What should get activated for the anntoation stack? Only used when position is not NULL. See stack_active for details.

Value

A heatmap_active object which can be added into HeatmapLayout.

Examples

ggheatmap(matrix(rnorm(81), nrow = 9)) +
    hmanno("top") +
    align_dendro()

[Package ggalign version 0.0.3 Index]