as_gtable | R Documentation |
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.
as_gtable(plot)
plot_to_gtable(plot)
plot |
The plot or other graphics object to convert into a gtable. Here, |
To convert ggplot plots, the function needs to use a null graphics device. This can be set
with set_null_device()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.