plotYieldVsSize | R Documentation |
Plots the normalised number density of the catch for a species as a function
of either length or weight. In addition to the catch in the model, also the
observed catch will be plotted if it is supplied via the catch
argument.
Also superimposes a plot of the number density of all individuals of the
species.
plotYieldVsSize(
object,
species = NULL,
gear = NULL,
catch = NULL,
x_var = c("Weight", "Length"),
return_data = FALSE
)
plotlyYieldVsSize(
object,
species = NULL,
gear = NULL,
catch = NULL,
x_var = c("Weight", "Length"),
...
)
object |
An object of class MizerSim or MizerParams. |
species |
The name of the predator species for which to plot the mortality. |
gear |
Optional. The name of a gear. If supplied, only the yield from this gear will be displayed. |
catch |
Data frame holding binned observed catch data. The data can be
binned either into length bins or weight bins. In the former case the data
frame should have columns |
x_var |
Determines whether to show the size distribution of the catch as a function of weight ("Weight") or as a function of length ("Length"). Default is "Weight". |
return_data |
A boolean value that determines whether the formatted data used for the plot is returned instead of the plot itself. Default value is FALSE |
... |
Other arguments (currently unused) |
A ggplot2 object, unless return_data = TRUE
, in which case a list
composed of two slots is returned. First slot is a data frame with the four
variables 'w' or 'l' (depending on x_var
), 'Catch density', 'Type', 'Species
and the second slot is a data frame with the four variables 'w_mat',
'Species', 'y_coord', 'Type' (to plot vertical lines).
plotting_functions
Other plotting functions:
plotDeath()
,
plotEnergyBudget()
,
plotResourceLevel()
,
plotResourcePred()
,
plotYieldVsF()
plotYieldVsSize(NS_params, species = "Cod")
# Returning the data frame
fr <- plotYieldVsSize(NS_params, species = "Cod", return_data = TRUE)
str(fr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.