Usage
animateSpectra(
sim,
species,
time_range,
wlim,
ylim,
power,
total,
resource,
background,
...
)Arguments
- sim
A MizerSim object
- species
Name or vector of names of the species to be plotted. By default all species are plotted.
- time_range
The time range to animate over. Either a vector of values or a vector of min and max time. Default is the entire time range of the simulation.
- wlim
A numeric vector of length two providing lower and upper limits for the w axis. Use NA to refer to the existing minimum or maximum.
- ylim
A numeric vector of length two providing lower and upper limits for the y axis. Use NA to refer to the existing minimum or maximum. Any values below 1e-20 are always cut off.
- power
The abundance is plotted as the number density times the weight raised to
power. The defaultpower = 1gives the biomass density, whereaspower = 2gives the biomass density with respect to logarithmic size bins.- total
A boolean value that determines whether the total over all species in the system is plotted as an additional trace called
"Total". Default is FALSE.- resource
A boolean value that determines whether resource is included. If
TRUE, the resource spectrum is plotted as an additional trace called"Resource". Default is TRUE.- background
A boolean value that determines whether background species are included. Ignored if the model does not contain background species. Default is TRUE.
- ...
Additional arguments passed to the method.
Value
A plotly object with one animated line trace per plotted group. The
y-axis title depends on power.
See also
Other plotting functions:
plot,
plotBiomass(),
plotDiet(),
plotFMort(),
plotFeedingLevel(),
plotGrowthCurves(),
plotMizerParams,
plotMizerSim,
plotPredMort(),
plotSpectra(),
plotYield(),
plotYieldGear(),
plotting_functions
Examples
# \donttest{
animateSpectra(NS_sim, power = 2, wlim = c(0.1, NA), time_range = 1997:2007)
# }
