plotSpectra | R Documentation |
After running a projection, the spectra of the abundance of each species and
the background population can be plotted. 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). The abundance can be in terms of numbers or biomass,
depending on the biomass
argument.
Plot the abundance spectra using a therMizerSim
object.
plotSpectra(object, ...)
## S4 method for signature 'therMizerSim'
plotSpectra(object,
time_range = max(as.numeric(dimnames(object@n)$time)),
min_w = min(object@params@w)/100, biomass = TRUE, print_it = TRUE, ...)
object |
An object of class |
... |
Other arguments (currently unused) |
time_range |
The time range (either a vector of values, a vector of min and max time, or a single value) to average the abundances over. Default is the final time step. |
min_w |
Minimum weight to be plotted (useful for truncating the background spectrum). Default value is a hundredth of the minimum size value of the community. |
biomass |
A boolean value. Should the biomass spectrum (TRUE) be plotted or the abundance in numbers (FALSE). Default is TRUE. |
print_it |
Display the plot, or just return the ggplot2 object |
A ggplot2 object
## Not run:
data(NS_species_params_gears)
data(inter)
params <- therMizerParams(NS_species_params_gears, inter)
sim <- project_therMizer(params, effort=1, t_max=20, t_save = 2)
plotSpectra(sim)
plotSpectra(sim, min_w = 1e-6)
plotSpectra(sim, time_range = 10:20)
plotSpectra(sim, time_range = 10:20, biomass = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.