plot_phenology: Visualize fish phenology

View source: R/plot_phenology.R

plot_phenologyR Documentation

Visualize fish phenology

Description

The function takes the output from predict_phenology() and creates a basic ggplot2 plot object to visualize the predicted phenology.

Usage

plot_phenology(plot, style = "all", labels = TRUE)

Arguments

plot

A list containing the output from predict_phenology()

style

The style of the plot. A vector with possible values "all", "ef_cumsum", "ef_daily". The default is "all".

labels

Logical. If TRUE (default), labels are added to the plot.

Value

A object of class "gg" and "ggplot".

Examples

library(hatchR)
# get model parameterization
sockeye_hatch_mod <- model_select(
  author = "Beacham and Murray 1990",
  species = "sockeye",
  model = 2,
  development_type = "hatch"
)
# predict phenology
sockeye_hatch <- predict_phenology(
  data = woody_island,
  dates = date,
  temperature = temp_c,
  spawn.date = "1990-08-18",
  model = sockeye_hatch_mod
)
plot_phenology(sockeye_hatch)
plot_phenology(sockeye_hatch, style = "ef_cumsum")
plot_phenology(sockeye_hatch, style = "ef_daily")
plot_phenology(sockeye_hatch, labels = FALSE)

hatchR documentation built on April 3, 2025, 7:54 p.m.