SaveFigure: Wrapper function to save ggplots

View source: R/SaveFigure.R

SaveFigureR Documentation

Wrapper function to save ggplots

Description

This is ggsave Wrapper function with defaiults so we don't have to keep entering everything in ggsave.

Usage

SaveFigure(
  folder,
  filename,
  figure,
  format = ".png",
  width = 15,
  height = 10,
  units = "cm",
  ...
)

Arguments

folder

Character string for the folder where figure will be saved.

filename

Character string specifiying the file name.

figure

ggplot object.

format

String specifying the file format of the figure. Default ".png".

width

Saved plot width. Default is 15 cm.

height

Saved plot height. Default 10 cm.

units

String specifying units for plot dimension. Default centimetres.

...

Additional ggsave inputs.

Value

None. Saves file in specified directory.

Author(s)

Richard T Gray, Rgray@kirby.unsw.edu.au


leftygray/LeftysRpkg documentation built on Feb. 11, 2024, 5:13 p.m.