Plot Trajectory of Average Population Age
plot_average_age.RdPlot median trajectory of average population age across all simulations as a line plot.
Usage
plot_average_age(
data,
v1 = "hcr",
v2 = NA,
v3 = NA,
common_trajectory = 54,
time_horizon = NULL,
interval_widths = c(0.5, 0.8),
base_hcr = "F40",
highlight = NULL,
relative = NA
)Arguments
- data
tibble output from `get_average_age()`
- v1
variable to map to color (e.g. "hcr")
- v2
variable to facet by (e.g. "om")
- v3
variable to facet by in addition to v2 (e.g. "om")
- common_trajectory
year to plot vertical dashed line to indicate where MSE projection period begins
- base_hcr
HCR to plot as a thicker line for reference (must match names in `extra_columns`)
- highlight
vector of HCRs to highlight with color (must match names in `extra_columns`)
- relative
whether to relativize average age to a specific HCR (must match names in `extra_columns`)