View source: R/ArraySpeciesBySize-class.R
| addPlot | R Documentation |
addPlot() adds another set of values to an existing ggplot, for example to
compare the same rate before and after a model change. There are methods for
all the mizer array classes. Each checks whether the existing plot uses a
compatible x variable, and warns if the y variable or y-axis units appear to
differ.
addPlot(
plot,
x,
species = NULL,
total = FALSE,
background = TRUE,
colour = NULL,
linetype = "dashed",
linewidth = 0.8,
alpha = 1,
...
)
plot |
A ggplot2 object to which the new values should be added. |
x |
An object containing the values to add. Can be an
|
species |
Character vector of species to include. |
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 |
colour |
Optional fixed colour for the added lines. If |
linetype |
Optional fixed line type for the added lines. If |
linewidth |
Width of the added lines. |
alpha |
Transparency of the added lines. |
... |
Further arguments used by only some of the methods: For the
For the
For
For the
|
A ggplot2 object.
Other plotting functions:
animate(),
plot,
plot2(),
plotBiomass(),
plotCDF(),
plotCDF2(),
plotDiet(),
plotFMort(),
plotFeedingLevel(),
plotGrowthCurves(),
plotMizerParams,
plotMizerSim,
plotPredMort(),
plotRelative(),
plotSpectra(),
plotSpectra2(),
plotSpectraRelative(),
plotYield(),
plotYieldGear(),
plotYieldVsF(),
plotting_functions
p <- plot(getEncounter(NS_params), species = "Cod")
addPlot(p, getEncounter(NS_params), species = "Cod")
pr <- plot(getResourceMort(NS_params))
addPlot(pr, getResourceMort(NS_params))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.