View source: R/ArraySpeciesBySize-class.R
| plotRelative | R Documentation |
plotRelative() plots the difference between two compatible mizer array
objects relative to their average. If the values in the first object are
N_1 and the values in the second are N_2, it plots
2 (N_2 - N_1) / (N_1 + N_2).
plotRelative(
x,
y,
species = NULL,
log_x,
ylim = c(NA, NA),
total = FALSE,
background = TRUE,
highlight = NULL,
...
)
x |
The first of two compatible mizer array objects to compare.
Can be an |
y |
The second mizer array object, compatible with |
species |
Character vector of species to include. |
log_x |
If |
ylim |
A numeric vector of length two providing lower and upper limits for the value (y) axis. |
total |
A boolean value that determines whether the total is plotted
as well. The total is the total of everything the array holds, every
species and every size, whatever is drawn. Default is |
background |
A boolean value that determines whether background species
are included. Ignored if the model does not contain background species.
Default is |
highlight |
Name or vector of names of the species to be highlighted with a thicker line. |
... |
Further arguments used by only some of the methods: For the
For the
For
For the
|
A ggplot2 object.
Other plotting functions:
addPlot(),
animate(),
plot,
plot2(),
plotBiomass(),
plotCDF(),
plotCDF2(),
plotDiet(),
plotFMort(),
plotFeedingLevel(),
plotGrowthCurves(),
plotMizerParams,
plotMizerSim,
plotPredMort(),
plotSpectra(),
plotSpectra2(),
plotSpectraRelative(),
plotYield(),
plotYieldGear(),
plotYieldVsF(),
plotting_functions
params <- NS_params
given_species_params(params)["Cod", "w_mat"] <- 1200
plotRelative(getEGrowth(NS_params), getEGrowth(params),
wlim = c(500, 2000), log_x = FALSE, species = "Cod")
# The same works for the resource
params2 <- setResource(NS_params,
resource_capacity = 2 * resource_capacity(NS_params))
plotRelative(resource_capacity(NS_params), resource_capacity(params2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.