ggsave_custom.Rd
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",
...
)
File name to create on disk.
Plot to save, defaults to last plot displayed.
width of plot
height of plot
units of plot
Path of the directory to save plot to: path
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.
fig4 <- grouped_barchart(
data = comorbidities, xvar = "Comorbidities",
yvar = "Prevalence", groupvar = "Severity",
chartcolors = colfun()$fig4_colors
)
ggsave_custom("figure4.jpeg", imgpath = tempdir(), inplot = fig4)