Adds customized defaults to ggsave for the BRAP Journal requirements

ggsave_custom(
  save_name,
  inplot,
  wdth = 7,
  hght = 4.1,
  unts = "in",
  imgpath = "inst/img/",
  bgcol = "white",
  ...
)

Arguments

save_name

File name to create on disk.

inplot

Plot to save, defaults to last plot displayed.

wdth

width of plot

hght

height of plot

unts

units of plot

imgpath

Path of the directory to save plot to: path

bgcol

Background color. If NULL, uses the plot.background fill value from the plot theme.

...

Other arguments passed on to the graphics device function, as specified by device.

Examples

fig4 <- grouped_barchart(
  data = comorbidities, xvar = "Comorbidities",
  yvar = "Prevalence", groupvar = "Severity",
  chartcolors = colfun()$fig4_colors
)
ggsave_custom("figure4.jpeg", imgpath = tempdir(), inplot = fig4)