plot_temperature_density: Plot a posterior temperature density (e.g. CTmax or T_crit)

View source: R/plotting.R

plot_temperature_densityR Documentation

Plot a posterior temperature density (e.g. CTmax or T_crit)

Description

Density plot of a per-draw temperature posterior, with a horizontal segment marking the 95% CrI and a point at the median. Useful for visualising derive_temperature_for_duration() output.

Usage

plot_temperature_density(temp_post, truth = NULL, x_label = "Temperature (°C)")

Arguments

temp_post

Output of derive_temperature_for_duration(): a list with ⁠$draws⁠ (carrying a per-draw temp column) and ⁠$summary⁠.

truth

Optional numeric scalar: a true value to mark with a dashed vertical line.

x_label

X-axis label. Default "Temperature (°C)".

Value

A ggplot object.

Examples

## Not run: 
tp <- derive_temperature_for_duration(wf, exposure_duration = 60,
                                       temp_grid = seq(36, 44, by = 0.1))
plot_temperature_density(tp)

## End(Not run)

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