| plotSpectra | R Documentation |
Plots the number density multiplied by a power of the weight, with the power
specified by the power argument.
plotSpectra(
object,
species = NULL,
time_range,
geometric_mean = FALSE,
wlim = c(NA, NA),
ylim = c(NA, NA),
power = 1,
biomass = TRUE,
total = FALSE,
resource = TRUE,
background = TRUE,
highlight = NULL,
return_data = FALSE,
...
)
plotlySpectra(
object,
species = NULL,
time_range,
geometric_mean = FALSE,
wlim = c(NA, NA),
ylim = c(NA, NA),
power = 1,
biomass = TRUE,
total = FALSE,
resource = TRUE,
background = TRUE,
highlight = NULL,
...
)
When called with a MizerSim object, the abundance is averaged over the specified time range (a single value for the time range can be used to plot a single time step). When called with a MizerParams object the initial abundance is plotted.
A ggplot2 object, unless return_data = TRUE, in which case a data
frame with the four variables 'w', 'value', 'Species', 'Legend' is
returned.
plotting_functions
Other plotting functions:
animateSpectra(),
plot,MizerParams,missing-method,
plot,MizerSim,missing-method,
plotBiomass(),
plotDiet(),
plotFMort(),
plotFeedingLevel(),
plotGrowthCurves(),
plotPredMort(),
plotYield(),
plotYieldGear(),
plotting_functions
params <- NS_params
sim <- project(params, effort=1, t_max=20, t_save = 2, progress_bar = FALSE)
plotSpectra(sim)
plotSpectra(sim, wlim = c(1e-6, NA))
plotSpectra(sim, time_range = 10:20)
plotSpectra(sim, time_range = 10:20, power = 0)
plotSpectra(sim, species = c("Cod", "Herring"), power = 1)
# Returning the data frame
fr <- plotSpectra(sim, return_data = TRUE)
str(fr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.