save_plot: Saves plots

Description Usage Arguments Value

Description

Helper function that saves (gg)plots as PNG and PDF simultaneously The default size should save plots large enough for a poster Modified from: https://gist.github.com/sheymann/2399659

Usage

1
2
save_plot(filename, plot = last_plot(), width = 15, height = 15,
  units = "cm", save_data = FALSE, ...)

Arguments

filename

Base file name/path

plot

The gggplot2 object to be saved

width

width of the save image. Default: 15 cm

height

height of the save image. Default: 15 cm

save_data

whether to save the data underlying the plot. The filename will be a composite of _filename_ and ".data.txt"

...

Additional ggsave arguments

Value

Files are saved


adomingues/makeitprettier documentation built on June 28, 2019, 9:47 a.m.