Learn R Programming

ggplotify (version 0.1.2)

base2grob: base2grob

Description

convert base plot to grob object

Usage

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

Value

grob object

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

Author

Guangchuang Yu

Examples

Run this code
base2grob(~plot(rnorm(10)))

Run the code above in your browser using DataLab