After running a projection, plot the total fishing mortality of each species by size. The total fishing mortality is averaged over the specified time range (a single value for the time range can be used to plot a single time step).
plotFMort(
object,
species = NULL,
all.sizes = FALSE,
highlight = NULL,
wlim = c(NA, NA),
llim = c(NA, NA),
size_axis = c("w", "l"),
return_data = FALSE,
log_x = TRUE,
log_y = FALSE,
log = NULL,
...
)A ggplot2 object, unless return_data = TRUE, in which case a data
frame with the three variables 'w' (or 'l' if size_axis = "l"), 'value',
'Species' is returned.
An object of class MizerSim or MizerParams.
The species to be selected. Optional. By default all target species are selected. A vector of species names, or a numeric vector with the species indices, or a logical vector indicating for each species whether it is to be selected (TRUE) or not.
If TRUE, then fishing mortality is plotted also for sizes outside a species' size range. Default FALSE.
Name or vector of names of the species to be highlighted.
A numeric vector of length two providing lower and upper limits
for the weight (x) axis. Use NA to auto-scale to the data range.
A numeric vector of length two providing lower and upper limits
for the length (x) axis when size_axis = "l". Use NA to auto-scale to
the data range.
Whether to plot size as weight ("w", default) or length
("l"), using the allometric weight-length relationship.
A boolean value that determines whether the formatted data used for the plot is returned instead of the plot itself. Default is FALSE.
If TRUE (default), use a log10 x-axis.
If TRUE, use a log10 y-axis. Default is FALSE.
Character string specifying which axes should use log10 scales,
in the same form as the base plot() argument. For example, "x",
"y", "xy" or "". If supplied, this overrides log_x and log_y.
Further arguments used by only some of the methods:
For MizerSim methods:
time_rangeThe time range (either a vector of values, a vector of min and max time, or a single value) to average the fishing mortality over. Default is the final time step.
plotting_functions, getFMort()
Other plotting functions:
addPlot(),
animate.ArrayTimeBySpeciesBySize(),
plot,
plot2(),
plotBiomass(),
plotCDF(),
plotCDF2(),
plotDiet(),
plotFeedingLevel(),
plotGrowthCurves(),
plotMizerParams,
plotMizerSim,
plotPredMort(),
plotRelative(),
plotSpectra(),
plotSpectra2(),
plotSpectraRelative(),
plotYield(),
plotYieldGear(),
plotting_functions
# \donttest{
params <- NS_params
sim <- project(params, effort=1, t_max=20, t_save = 2, progress_bar = FALSE)
plotFMort(sim)
plotFMort(sim, highlight = c("Cod", "Haddock"))
# Returning the data frame
fr <- plotFMort(sim, return_data = TRUE)
str(fr)
# }
Run the code above in your browser using DataLab