plot_biomass_data: Plot Biomass Data

View source: R/plot_biomass_data.R

plot_biomass_dataR Documentation

Plot Biomass Data

Description

plot_biomass_data plots biomass for a given model or models. Different graphs can be output by using the 'type' argument.

Usage

plot_biomass_data(
  dat,
  title = NULL,
  ymax = NULL,
  cumulative = FALSE,
  plotly = FALSE
)

Arguments

title

A character object containing the plot title. If left NULL (default), a title will be automatically generated

ymax

A number representing the max for the y-axis. If left null(default), this will be chosen automatically.

plotly

TRUE or FALSE (default). If TRUE, a plotly::ggplotly() object will be returned.

dat1

A .rdat containing ADMB output

dat2

A .rdat containing ADMB output

dat3

A .rdat containing ADMB output

type

"single","multiple", or "cumulative". This determines the type of plot that will be produced. If "single" is selected model results will be plotted for an individual model. Only supply a '.rdat' object to 'dat1' when using 'single'. The 'multiple' argument will add biomass data from multiple models to one plot. The 'cumulative' type will produce a stacked area plot containing biomass from multiple models. When 'cumulative' or 'multiple' are specified, pass additional '.rdat' files to 'dat2' and/or 'dat3'

Value

A ggplot2::ggplot() or plotly::ggplotly() object

Examples

plot_biomass_data(dat1 = trout1,type = 'single')
plot_biomass_data(dat1 = trout1,dat2 = trout2, type = 'multiple')
plot_biomass_data(dat1 = trout1,dat2 = trout2, type = 'cumulative')

zac-driscoll/trout.modlR documentation built on March 24, 2022, 10:04 p.m.