Learn R Programming

mizer (version 2.0.3)

plotYield: Plot the total yield of species through time

Description

After running a projection, the total yield of each species across all fishing gears can be plotted against time. The yield is obtained with getYield().

Usage

plotYield(sim, sim2, species, total = FALSE, log = TRUE, highlight = NULL, ...)

plotlyYield( sim, sim2, species, total = FALSE, log = TRUE, highlight = NULL, ... )

Arguments

sim

An object of class '>MizerSim

sim2

An optional second object of class '>MizerSim. If this is provided its yields will be shown on the same plot in bolder lines.

species

Name or vector of names of the species to be plotted. By default all species are plotted.

total

A boolean value that determines whether the total over all species in the system is plotted as well. Default is FALSE

log

Boolean whether yield should be plotted on a logarithmic axis. Defaults to true.

highlight

Name or vector of names of the species to be highlighted.

...

Other arguments (currently unused)

Value

A plot

See Also

plotting_functions, getYield()

Other plotting functions: plot,MizerSim,missing-method, plotBiomass(), plotDiet(), plotFMort(), plotFeedingLevel(), plotGrowthCurves(), plotPredMort(), plotSpectra(), plotYieldGear(), plotting_functions

Examples

Run this code
# NOT RUN {
params <- suppressMessages(newMultispeciesParams(NS_species_params_gears, inter))
sim <- project(params, effort=1, t_max=20, t_save = 0.2, progress_bar = FALSE)
plotYield(sim)
plotYield(sim, species = c("Cod", "Herring"), total = TRUE)

# Comparing with yield from twice the effort
sim2 <- project(params, effort=2, t_max=20, t_save = 0.2, progress_bar = FALSE)
plotYield(sim, sim2, species = c("Cod", "Herring"), log = FALSE)
# }

Run the code above in your browser using DataLab