Learn R Programming

thisplot (version 0.3.7)

annotation_block_graphics: Build block panel function

Description

Build block panel function

Usage

annotation_block_graphics(subplot, name, border = TRUE)

Value

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

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab