View source: R/project_management.R
ggsave_show | R Documentation |
This wraps ggsave
and opens the folder where the graph was saved in a Shell.
From there, it can easily be dragged and dropped into the application where you want to use it.
It also changes the default units from in to cm, and defaults to saving temporary png files.
ggsave_show(filename = NULL, ..., device = NULL, units = "cm")
filename |
File name with path. If not provided, only a temporary file is saved |
... |
Arguments passed on to
|
device |
Device to use. Can either be a device function
(e.g. png), or one of "eps", "ps", "tex" (pictex),
"pdf", "jpeg", "tiff", "png", "bmp", "svg" or "wmf" (windows only). If
|
units |
Unit for width and height, if provided. Defaults to "cm", can also be "in" or "mm" |
https://stackoverflow.com/a/12135823/10581449
## Not run:
ggplot(mtcars, aes(mpg)) + geom_histogram()
ggsave_show(here::here("mtcars.pdf"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.