Plots community and/or species-specific Spawning Stock Biomass (SSB) or total biomass.
plot_SSB(inputs, outputs, ...)# S4 method for LeMans_param,LeMans_outputs
plot_SSB(inputs, outputs, species, time_steps, species_names, SSB, ...)
# S4 method for LeMans_param,missing
plot_SSB(inputs, N, species, time_steps, species_names, SSB, ...)
# S4 method for missing,LeMans_outputs
plot_SSB(wgt, mature, outputs, species, time_steps, species_names, SSB, ...)
# S4 method for missing,missing
plot_SSB(
wgt,
mature,
N,
species,
species_names,
time_steps,
SSB,
full_plot_only = TRUE,
units = "g",
...
)
plot_biomass(inputs, outputs, ...)
# S4 method for LeMans_param,LeMans_outputs
plot_biomass(inputs, outputs, species, time_steps, species_names, biomass, ...)
# S4 method for LeMans_param,missing
plot_biomass(inputs, N, species, time_steps, biomass, species_names, ...)
# S4 method for missing,LeMans_outputs
plot_biomass(wgt, outputs, species, time_steps, biomass, species_names, ...)
# S4 method for missing,missing
plot_biomass(
wgt,
N,
species,
time_steps,
species_names,
biomass,
full_plot_only = TRUE,
units = "g",
...
)
Additional arguments.
A numeric value or vector or a character string or vector denoting the species to be used in the plot(s). The default is 1:dim(N)[2]
.
A numeric vector denoting the time steps to be used to calculate and/or plot SSB. The default is 1:dim(N)[3]
or 1:length(SSB)
.
A character vector of length 1:dim(N)[2]
that denotes the names of the species in the model. This option is only required if inputs
is not provided.
A numeric vector or a matrix representing the outputs of the function get_SSB()
. This option is only required if inputs
and outputs
are not provided.
An array with dimensions nsc
, nfish
and tot_time
representing the number of individuals in each length class for each time step, where nsc
represents the number of length classes in the model, nfish
represents the number of species in the model and tot_time
represents the number of time steps that the model was run for. This option is only required if outputs
and SSB
are not provided.
A matrix with dimensions nsc
and nfish
representing the weight of each species in each length class. This option is only required if inputs
and SSB
are not provided.
A matrix with dimensions nsc
and nfish
and elements in the range 0-1 representing the proportion of individuals that are mature for each species and length class, where nsc
represents the number of length classes in the model and nfish
represents the number of species in the model. This option is only required if outputs
and SSB
are not provided.
A logical statement indicating whether a single plot depicting the SSB of all of the selected species should be produced (full_plot_only=TRUE
) or multiple plots depicting the SSB of individual species should be produced (full_plot_only=FALSE
). The default is TRUE
.
A character string denoting the units of weight used in the model. The default is "g"
.
A numeric vector or a matrix representing the outputs of the function get_biomass()
. This option is only required if inputs
and outputs
are not provided.
plot_SSB
returns line plots of the in SSB of the selected species through time.
plot_biomass
returns line plots of the changes in biomass of the selected species through time.
# NOT RUN {
# Set up and run the model
NS_params <- LeMansParam(NS_par, tau=NS_tau, eta=rep(0.25, 21), L50=NS_par$Lmat, other=1e12)
effort <- matrix(0.5, 10, dim(NS_params@Qs)[3])
model_run <- run_LeMans(NS_params, years=10, effort=effort)
# Calculate SSB
SSB <- get_SSB(NS_params, model_run)
# Plot SSB
plot_SSB(SSB=SSB)
# Calculate biomass
biomass <- get_biomass(NS_params, model_run)
# Plot biomass
plot_biomass(biomass=biomass)
# }
Run the code above in your browser using DataLab