plotYieldGear: Plot the total yield of each species by gear through time

Description Usage Arguments Details Value See Also Examples

Description

After running a projection, the total yield of each species by fishing gear can be plotted against time.

Plot the yield of each gear using a MizerSim object.

Usage

1
2
3
4
5
6
plotYieldGear(sim, ...)

## S4 method for signature 'MizerSim'
plotYieldGear(sim,
  species = as.character(sim@params@species_params$species),
  print_it = TRUE, total = FALSE, ...)

Arguments

sim

An object of class MizerSim

...

Other arguments to pass to getYieldGear method

species

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

print_it

Display the plot, or just return the ggplot2 object. Defaults to TRUE

total

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

Details

This plot is pretty easy to do by hand. It just gets the biomass using the getYieldGear method and plots using the ggplot2 package. You can then fiddle about with colours and linetypes etc. Just look at the source code for details.

Value

A ggplot2 object

See Also

getYieldGear

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
data(NS_species_params_gears)
data(inter)
params <- MizerParams(NS_species_params_gears, inter)
sim <- project(params, effort=1, t_max=20, t_save = 0.2)
plotYieldGear(sim)
plotYieldGear(sim, species = c("Cod", "Herring"), total = TRUE)

## End(Not run)

drfinlayscott/mizer documentation built on May 18, 2018, 9:20 a.m.