1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/as_gtable.R
\name{as_gtable}
\alias{as_gtable}
\alias{plot_to_gtable}
\title{Convert plot or other graphics object into a gtable}
\usage{
as_gtable(plot)
plot_to_gtable(plot)
}
\arguments{
\item{plot}{The plot or other graphics object to convert into a gtable. Here, \code{plot} can be
any object handled by \code{\link[=as_grob]{as_grob()}}.}
}
\description{
This function does its best attempt to take whatever you provide it and turn it into a gtable.
It is primarily meant to convert ggplot plots into gtables, but it will also take any grid
object (grob), a recorded R base plot, or a function that generates an R base plot.
}
\details{
To convert ggplot plots, the function needs to use a null graphics device. This can be set
with \code{\link[=set_null_device]{set_null_device()}}.
}
|