Description Usage Arguments Value Examples
A wrapper for calling grDevices::png()
then grDevices::dev.off()
. Allows
users to save a plot to a specified path. The preferred method for
ggplot2::ggplot
objects remains ggplot::ggsave()
. However if you wish to
use this function to save ggplot2::ggplot
objects, print the plot as the
last step of plot_code
.
1 |
plot_code |
code required to generate the plot, sandwiched in curly braces. |
path |
|
width |
the width of the device. |
height |
the height of the device. |
units |
The units in which |
res |
The nominal resolution in ppi which will be recorded in the
bitmap file, if a positive integer. Also used for |
... |
additional arguments are passed to |
Invisibly, the path to saved plot.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.