si_save | R Documentation |
Wrapper around ggplot2::ggsave with SI standards
si_save(
filename,
plot = last_plot(),
path = NULL,
scale = 1,
width = 10,
height = 5.625,
dpi = 320,
...
)
filename |
File name to create on disk, png unless otherwise specified |
plot |
Plot to save, defaults to last plot displayed. |
path |
Path of the directory to save plot to: path and filename are combined to create the fully qualified file name. Defaults to the working directory. |
scale |
Multiplicative scaling factor. |
width |
plot width in inches, default = 10 |
height |
plot height in inches, default = 5.625 |
dpi |
plot resolution |
... |
additional arguments to that pass to ggsave |
exports a file with SI dimensions
Other saving:
si_clear_preview()
,
si_preview()
## Not run:
library(systemfonts)
library(ggplot2)
ggplot(iris, aes(Sepal.Length, y = Sepal.Width, colour = Species)) +
geom_point() + si_style()
#default save
si_save("out/sepal.png")
#defaults to png if not specified (.pdf, .svg, .jpeg)
si_save("out/sepal")
#change the width
si_save("out/sepal.jpeg", width = 5)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.