normalize_drawable: Normalize drawable objects to grobs

View source: R/heatmap.R

normalize_drawableR Documentation

Normalize drawable objects to grobs

Description

Normalize drawable objects to grobs

Usage

normalize_drawable(obj)

Arguments

obj

A drawable object, such as a ggplot, patchwork, or grid grob.

Value

A grid grob object. If the input is not drawable, returns a null grob.

Examples

library(ggplot2)
p <- ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) +
  ggplot2::geom_point()
g <- normalize_drawable(p)
p + g

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