Skip to contents

This only exists to make it easy to use it in make_link()

Usage

ggsaver(plot, filename, ...)

Arguments

plot

Plot

filename

Note

...

Arguments forwarded to ggplot2::ggsave()

Value

No return value, called for side effects

Examples

library(ggplot2)
my_plot <- ggplot(data=mtcars, aes(x=hp, y=mpg)) + geom_point()
make_link(my_plot, folder=tempdir(), file_suffix = ".png",
          save_fn = ggsaver, width = 16, height = 16, units = "cm")
#> Saving 7 x 7 in image
#> [1] "[download figure data](/tmp/Rtmp44sfTf/5aeb074c5089c0eed87ffb8973b70851.png)"