plot.emergence: Plot an Emergence-Period Projection

View source: R/emergence_plot.R

plot.emergenceR Documentation

Plot an Emergence-Period Projection

Description

Draws the cumulative development curve of the survey (stage shares accumulated from the most developed stage downwards) against the projected eclosion dates, marks the quantile crossings (16 projection exists, arrows from each eclosion date to the corresponding hatch date. The quantile dates are listed in a legend box on the right-hand side of the figure (one row per quantile, with a true arrow glyph instead of the character combination "->").

Usage

## S3 method for class 'emergence'
plot(
  x,
  show_hatch = TRUE,
  title = NULL,
  sub = NULL,
  family = "serif",
  cex = 2,
  lwd = 2,
  legend_right = TRUE,
  xlab = "Projected eclosion date",
  ylab = "Cumulative development (%)",
  ...
)

Arguments

x

A "emergence" object returned by emergence_calc or emergence_analyze.

show_hatch

Logical (default TRUE); whether to draw the hatch arrows when a hatch projection exists.

title

Plot title; NULL (default) uses the automatic caption (survey date and sample size). Use "" to drop the title.

sub

Plot footnote; NULL (default) shows the hatch parameters when show_hatch is active (drawn below the x-axis title). Use "" to drop it.

family

Text font family. Default "serif" — a portable alias that maps to Times New Roman on 'Windows' and to the system serif font elsewhere; Chinese characters are rendered through the device's font fallback (SimSun on Chinese 'Windows'). Set to "" for the device default.

cex

Overall text-size multiplier. Default 2: the exported figure is meant to be placed at half the text width of a manuscript, where the labels, ticks and title then appear at about the size of the body text (12 pt). Set to 1 for full-screen viewing; the margins scale with cex automatically.

lwd

Overall line-width multiplier. Default 2.

legend_right

Logical (default TRUE); whether the quantile legend is placed outside the panel on the right-hand side (TRUE) or in the top-left corner of the panel (FALSE).

xlab, ylab

Axis labels.

...

Further graphical parameters passed to plot.

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)
plot(fit)

## the projection is fully customisable (title, axis labels, font
## family); Chinese labels are rendered through the device's font
## fallback (SimSun on Chinese 'Windows'):
plot(fit, title = "Stage-grading projection",
     xlab = "Projected eclosion date",
     ylab = "Cumulative development (%)")

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