plotSpectraRelative | R Documentation |
This plots the difference between the spectra relative to their average. So
if we denote the number density from the first object as N_1(w)
and
that from the second object as N_2(w)
, then this plot shows
2 (N_2(w) - N_1(w)) / (N_2(w) + N_1(w)).
plotSpectraRelative(object1, object2, ...)
plotlySpectraRelative(object1, object2, ...)
object1 |
An object of class MizerSim or MizerParams |
object2 |
An object of class MizerSim or MizerParams |
... |
Parameters passed to |
The individual spectra are calculated by the plotSpectra()
function which
is passed all additional arguments you supply. So you can for example
determine a size range over which to average the simulation results via the
time_range
argument. See plotSpectra()
for more options.
Note that it does not matter whether the relative difference is calculated
for the number density or the biomass density or the biomass density in log
weight because the factors of w
by which the densities differ cancels
out in the relative difference.
A ggplot2 object
sim1 <- project(NS_params, t_max = 10)
sim2 <- project(NS_params, effort = 0.5, t_max = 10)
plotSpectraRelative(sim1, sim2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.