Skip to contents

Saves a ggplot with a default 100 mm square device. Raster output defaults to 450 dpi; vector formats retain editable geometry through ggplot2.

Usage

save_landscapeR_plot(
  plot,
  filename,
  width_mm = 100,
  height_mm = width_mm,
  dpi = 450,
  bg = "white",
  ...
)

Arguments

plot

a ggplot object.

filename

output path with a graphics extension understood by ggplot2::ggsave().

width_mm

output width in millimetres.

height_mm

output height in millimetres; defaults to width_mm.

dpi

raster resolution.

bg

device background.

...

additional arguments passed to ggplot2::ggsave().

Value

The normalized output path, invisibly.