Plots the median and quantiles of a time-series
Usage
plot_TS(
x,
xlab = "Year",
ylab = "Spawning Biomass",
title = "",
quantiles = c(0.025, 0.975),
scale = NULL,
alpha = 0.1,
lwd = 1,
use_theme = NULL,
colpalette = "Dark2",
facet = TRUE,
inc.Legend = !facet,
inc.Hist = FALSE,
print = TRUE,
get_function = get_SSB,
years = NULL,
...
)
plot_SSB(x, ...)
plot_Biomass(x, ylab = "Biomass", ...)
plot_Landings(x, ylab = "Landings", ...)
plot_Removals(x, ylab = "Removals", ...)
plot_Recruits(x, ylab = "Recruits", ...)
plot_F(x, ylab = "Fishing Mortality (F)", ...)
plot_LifeHistory(
x,
xlab = "Year",
ylab = "Median (quantiles)",
title = "",
quantiles = c(0.025, 0.975),
scale = NULL,
alpha = 0.1,
lwd = 1,
use_theme = NULL,
colpalette = "Dark2",
facet = TRUE,
inc.Legend = !facet,
inc.Hist = FALSE,
print = TRUE
)Arguments
- x
An object of class
Hist,MSE, or a list ofHistorMSEobjects- xlab
X-axis label (default 'Year')
- ylab
Y-axes label
- title
Optional title
- quantiles
Lower and upper quantiles to calculate. Numeric vector of length 2.
- scale
An optional function with a single numeric argument that returns transformed or scaled numeric values. See
lb2kgandkg2lbfor example. Can be a list of functions for list objects (NA for no transformation)- alpha
Transparency parameter
- lwd
Line width
- use_theme
Optional ggplot theme
- colpalette
Color palette from
RColorBrewer- facet
Logical. Facet the plot?
- inc.Legend
Logical. Include legend?
- inc.Hist
Logical. For
MSEresults, include the historical period?Logical. Print the plot?
- get_function
get_function to extract time-series information fromx- years
Optional numeric vector specifying the years to plot. Default is all years.
- ...
Named arguments passed to
plot_TS
Value
A named list with:
p | The ggplot object |
df | Data.frame with the summary statistics (median and quantiles) |
Functions
plot_SSB(): Plot the Spawning Biomassplot_Biomass(): Plot the Total Biomassplot_Landings(): Plot the Landings (biomass)plot_Removals(): Plot the Removals (biomass)plot_Recruits(): Plot the Recruits (numbers)plot_F(): Plot the Recruits (numbers)plot_LifeHistory(): Plot the Life-History parameters
