annotation_block_graphics: Build block panel function

View source: R/heatmap.R

annotation_block_graphicsR Documentation

Build block panel function

Description

Build block panel function

Usage

annotation_block_graphics(subplot, name, border = TRUE)

Arguments

subplot

A single drawable subplot object.

name

A name assigned to the generated grob.

border

Whether to draw a rectangle border around the block.

Value

A function with signature ⁠(index, levels)⁠ suitable for panel_fun in ComplexHeatmap::anno_block.

Examples

library(ggplot2)
p <- ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) +
  ggplot2::geom_point()
panel_fun <- annotation_block_graphics(
  subplot = p, name = "demo-block"
)
ComplexHeatmap::anno_block(panel_fun = panel_fun)

thisplot documentation built on March 7, 2026, 5:07 p.m.