save_a4 | R Documentation |
The dimensions are for the pixel size of an A4 page at 300 DPI. This is appropriate for inserting into Word without much detail loss, and with appropriate text and element sizes.
save_a4(path, basename, plot = ggplot2::last_plot(), portrait = FALSE)
path |
(Character) The output folder. It will be created if it does not
exist. One sub-directory ( |
basename |
(Character) Basename of the image, without path or extension.
Always saved as a |
plot |
(ggplot) The plot object to save. By default, saves the most recent ggplot. |
portrait |
(Logical) |
Returns TRUE
invisibly if successful.
# qplot(mpg, wt, data = mtcars)
# save_a4("_test", "x_mpg y_wt")
#> Wrote 'ggplot2::last_plot' to '_test/png/x_mpg y_wt.png'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.