plot_tdt_landscape: Plot the TDT survival landscape as a heatmap

View source: R/plotting.R

plot_tdt_landscapeR Documentation

Plot the TDT survival landscape as a heatmap

Description

Exposure-duration axis is linear by default; pass log_time = TRUE for the classical log-time TDT presentation.

Usage

plot_tdt_landscape(
  landscape,
  observed = NULL,
  contours = c(0.25, 0.5, 0.75),
  log_time = FALSE,
  clip_to_observed = TRUE,
  facet_scales = c("auto", "fixed", "free", "free_x", "free_y")
)

Arguments

landscape

Output of derive_tdt_landscape().

observed

Optional standardised data tibble to overlay.

contours

Numeric vector of survival levels to draw contours at. Default c(0.25, 0.5, 0.75).

log_time

Logical. If TRUE, exposure-duration y-axis is log10. Default FALSE (linear).

clip_to_observed

Logical. If TRUE (the default) and observed is supplied, each group's heatmap is restricted to the observed temperature range and capped at the longest observed exposure (shorter durations are still shown), so the surface is not drawn beyond the data; grouped panels use free axes to avoid plotting unsupported blank space. A no-op when observed is not supplied. Set FALSE for the full grid.

facet_scales

Facet scale behaviour for grouped landscapes. "auto" (default) uses free axes when clip_to_observed = TRUE and observed is supplied, otherwise fixed axes. Use "fixed" to force identical axes across groups, or any facet_wrap() scale option ("free", "free_x", "free_y").

Details

A grouped fit (a moderator on CTmax/z, e.g. oxygen or species) produces one heatmap panel per group, mirroring plot_survival_curves(); a single-condition fit returns the one ungrouped heatmap.

Value

A ggplot object.

Examples

## Not run: 
lsp <- derive_tdt_landscape(wf)
plot_tdt_landscape(lsp, observed = wf$data)

## End(Not run)

bayesTLS documentation built on Nov. 29, 2026, 1:06 a.m.