decorate_title: Decorate Heatmap Titles

View source: R/decorate.R

decorate_titleR Documentation

Decorate Heatmap Titles

Description

Decorate Heatmap Titles

Usage

decorate_title(heatmap, code, slice = 1, which = c("column", "row"),
    envir = new.env(parent = parent.frame()))

Arguments

heatmap

Name of the heatmap.

code

Code that adds graphics in the selected viewport.

slice

Index of the row slice or column slice in the heatmap.

which

Is it a row title or a column title?

envir

Where to look for variables inside code.

Details

There is a viewport for row titles and column title in the heatmap. This function contructs the name of the viewport, goes to the viewport by seekViewport , runs code to that viewport and finally goes back to the original viewport.

Value

The function returns no value.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

https://jokergoo.github.io/ComplexHeatmap-reference/book/heatmap-decoration.html

Examples

set.seed(123)
Heatmap(matrix(rnorm(100), 10), name = "mat", km = 2)
decorate_title("mat", {
    grid.rect(gp = gpar(fill = "#FF000080"))
}, which = "row", slice = 2)

jokergoo/ComplexHeatmap documentation built on Sept. 24, 2024, 4:48 p.m.