emergence_export_plot: Export the Emergence-Period Plot as PNG

View source: R/emergence_export.R

emergence_export_plotR Documentation

Export the Emergence-Period Plot as PNG

Description

Draws the emergence-period projection of an "emergence" object on a png device ('ragg' when available, otherwise png) and writes it to disk - the standalone counterpart of plot_file = in emergence_analyze, usable on an existing fit at any time. All plot options of plot.emergence are supported.

Usage

emergence_export_plot(
  x,
  file = "emergence_plot.png",
  show_hatch = TRUE,
  title = NULL,
  sub = NULL,
  xlab = NULL,
  ylab = NULL,
  family = NULL,
  width = 10.67,
  height = 6,
  units = c("in", "cm", "px"),
  res = 150,
  ...
)

Arguments

x

A "emergence" object returned by emergence_calc or emergence_analyze.

file

Output png path.

show_hatch, title, sub, xlab, ylab, family

Plot options, see plot.emergence; NULL (default) keeps the function defaults.

width, height, units, res

Physical size and resolution of the png; the composition is identical at every resolution, res only adds pixels (same semantics as in emergence_analyze).

...

Further arguments passed to plot.emergence.

Value

Invisibly, file.

Examples


f <- system.file("extdata", "emergence_example.csv",
                 package = "insectecol")
fit <- emergence_calc(emergence_read(f), survey_date = "2026-03-20",
                      pre_ovip = 3, egg_days = 10)
emergence_export_plot(fit, tempfile(fileext = ".png"))


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