lc50_export_plot: Save LC50 Plots

View source: R/lc50_plot.R

lc50_export_plotR Documentation

Save LC50 Plots

Description

Saves one plot or a list of plots from lc50_plot, like ggsave(path, plot, device = "tiff", width = 12, height = 8, dpi = 300, units = "cm", bg = "white") but with the dpi handling of lc50_plot applied. The same plot object can be written at any dpi without being re-created.

Usage

lc50_export_plot(
  plot,
  path = NULL,
  device = "tiff",
  width = 12,
  height = 8,
  dpi = 300,
  units = "cm",
  bg = "white",
  ...
)

Arguments

plot

A ggplot or a (named) list of ggplots.

path

Output file (single plot) or folder (list of plots, or a path without extension); NULL (default) opens a folder selection dialog.

device, width, height, units, bg

Passed on to ggsave (defaults "tiff", 12, 8, "cm", "white").

dpi

Resolution of the written file (default 300).

...

Further arguments passed on to ggsave.

Value

Path(s) of the written file(s), invisibly.

See Also

lc50_plot, lc50_export

Examples

f <- system.file("extdata", "lc50_example.csv", package = "insectecol")
plots <- lc50_plot(lc50_calculate(lc50_read(f)))
lc50_export_plot(plots$bioassay, file.path(tempdir(), "LC50_demo.tiff"))

insectecol documentation built on Oct. 5, 2026, 5:08 p.m.