View source: R/osmose.config-class.R
plot.osmose.config | R Documentation |
osmose.config
objectsThis method takes a osmose.config
object and produce
useful plots.
This function implements a plot method for different osmose classes.
## S3 method for class 'osmose.config' plot(x, what = "predation", ...) ## S3 method for class 'osmose.config.reproduction' plot( x, type = 1, species = 0, speciesNames = NULL, start = NULL, end = NULL, initialYear = NULL, freq = 12, xlim = NULL, ylim = NULL, col = "black", axes = TRUE, border = NA, legend = TRUE, ... ) ## S3 method for class 'osmose.config.species' plot( x, n = 100, type = 1, species = 0, speciesNames = NULL, addElements = c("segments", "points", "polygon", "text"), axes = TRUE, border = NA, xlim = NULL, ylim = NULL, legend = TRUE, col = "black", ... ) ## S3 method for class 'osmose.config.predation' plot( x, type = 1, species = 0, speciesNames = NULL, addElements = c("segments", "points", "text"), axes = TRUE, border = NA, xlim = NULL, ylim = NULL, col = "gray70", legend = TRUE, ... )
x |
|
what |
Variable name to plot. By default is |
... |
Extra arguments of the function. |
type |
A |
species |
A |
speciesNames |
A vector with the names for each species. If |
start |
A |
end |
A |
initialYear |
A |
freq |
A |
xlim, ylim |
numeric vectors of length 2, giving the x and y coordinates ranges. |
col |
A vector with the color names for the plots. By default
|
axes |
a |
border |
the color to draw the border of CI polygons, bar plots and
box plots. By default, |
legend |
|
n |
|
addElements |
A |
Plot types will depend on the class of x
, which is defined
by what
. Thereby,
what = predation
: Generates a plot of size range as shadows
for a selected species .
what = reproduction
: Generates a single plots of seasonality
of reproduction whether as lines (type = 1
) or bars (type = 2
)
what = species
: Generates a plot of growth curve following the
VB parameters defined on configuration files (type = 1
).
species
argument follows the indexation way of java: starting in zero,
as osmose-java returns species outputs.
Default value for freq
will be calculated from x
:
freq = 1/x$model$start.
Extra arguments can be passed using ...
and depending on the type, you
can modify arguments like: cex
, cex.axis
, border
(useful for polygon
and barplot
s), etc.
Ellipsis (...
) must be used carefully, since it will pass the
arguments to different generic plot functions. For instance, type = 2
of osmose.config.reproduction
method will use ...
to pass
arguments to barplot, so some arguments like cex
may match with
many formal arguments (e.g. cex.axis
and cex.names
), so it may
cause errors.
Criscely Lujan Paredes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.