base2grob: base2grob

View source: R/as-grob.R

base2grobR Documentation

base2grob

Description

convert base plot to grob object

Usage

base2grob(x, envir = parent.frame())

Arguments

x

expression or formula of base plot function call, e.g. expression(pie(1:5)) or ~plot(1:10, 1:10); or a function that plots to an R graphics device when called, e.g. function() plot(sqrt)

envir

environment to search variables

Value

grob object

Author(s)

Guangchuang Yu

Examples

base2grob(~plot(rnorm(10)))

ggplotify documentation built on Aug. 10, 2023, 1:06 a.m.