Description Usage Arguments Details Value Author(s)
This method takes a osmose
object and produce useful
plots
This function implements a plot method for different osmose classes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | ## S3 method for class 'osmose'
plot(x, what = "biomass", ...)
## S3 method for class 'osmose.biomass'
plot(
x,
ts = TRUE,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
initialYear = NULL,
replicates = TRUE,
freq = 12,
horizontal = FALSE,
conf = 0.95,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
alpha = NULL,
border = NULL,
lty = 1,
lwd = 1,
axes = TRUE,
legend = TRUE,
units = "tonnes",
...
)
## S3 method for class 'osmose.abundance'
plot(
x,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
initialYear = NULL,
ts = TRUE,
type = 1,
replicates = TRUE,
freq = 12,
horizontal = FALSE,
conf = 0.95,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
alpha = NULL,
border = NULL,
lty = 1,
lwd = 1,
axes = TRUE,
legend = TRUE,
units = "individuals",
...
)
## S3 method for class 'osmose.yield'
plot(
x,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
initialYear = NULL,
ts = TRUE,
type = 1,
replicates = TRUE,
freq = 12,
horizontal = FALSE,
conf = 0.95,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
alpha = NULL,
border = NULL,
lty = 1,
lwd = 1,
axes = TRUE,
legend = TRUE,
units = "tonnes",
...
)
## S3 method for class 'osmose.yieldN'
plot(
x,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
initialYear = NULL,
ts = TRUE,
type = 1,
replicates = TRUE,
freq = 12,
horizontal = FALSE,
conf = 0.95,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
alpha = NULL,
border = NULL,
lty = 1,
lwd = 1,
axes = TRUE,
legend = TRUE,
units = "individuals",
...
)
## S3 method for class 'osmose.biomassByTL'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "", y = "tonnes"),
...
)
## S3 method for class 'osmose.biomassBySize'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "cm", y = "tonnes"),
...
)
## S3 method for class 'osmose.biomassByAge'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "years", y = "tonnes"),
...
)
## S3 method for class 'osmose.abundanceByTL'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "", y = "individuals"),
...
)
## S3 method for class 'osmose.abundanceBySize'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "cm", y = "individuals"),
...
)
## S3 method for class 'osmose.abundanceByAge'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "years", y = "individuals"),
...
)
## S3 method for class 'osmose.yieldNBySize'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "cm", y = "individuals"),
...
)
## S3 method for class 'osmose.yieldNByAge'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "years", y = "individuals"),
...
)
## S3 method for class 'osmose.yieldBySize'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "cm", y = "tonnes"),
...
)
## S3 method for class 'osmose.yieldByAge'
plot(
x,
type = 1,
species = NULL,
speciesNames = NULL,
start = NULL,
end = NULL,
freq = 12,
horizontal = FALSE,
factor = 0.001,
xlim = NULL,
ylim = NULL,
col = NULL,
border = NULL,
legend = TRUE,
lty = 1,
lwd = 1,
axes = TRUE,
units = list(x = "years", y = "tonnes"),
...
)
|
x |
|
what |
Variable name to plot. By default is |
... |
Extra arguments of the function. See Details. |
ts |
|
type |
A |
species |
A |
speciesNames |
A vector with the names for each species. If |
start |
A |
end |
A |
initialYear |
A |
replicates |
|
freq |
A |
horizontal |
a |
conf |
|
factor |
A number to indicate the scale of the variable on the y-axis.
By default |
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
|
alpha |
factor modifying the opacity alpha given to confidence interval
(CI) polygons (check |
border |
the color to draw the border of CI polygons, bar plots and
box plots. The default value ( |
lty |
The line type (check |
lwd |
The line width (check |
axes |
a |
legend |
|
units |
String with units of the variable that defines the label set
on top of the plot. If |
what
argument can take next values:
"biomass" to plot the species biomass (see plot.osmose.biomass)
"abundance" to plot the species abundance (see plot.osmose.abundance)
"yield" to plot the species yield (see plot.osmose.yield)
"yieldN" to plot the species yield (in numbers) (see plot.osmose.yieldN)
User can select within different plot types depending on the osmose
class. So, for classes biomass
, abundance
, yield
and
yieldN
(Group 1) the user must use ts
and type
arguments to specify the type of plot to draw.
So, for the Group 1 and ts = TRUE
, user will select within:
type = 1
: Generates a matrix plot of the selected variable
plotted independently.
type = 2
: Generates a single plot with overlaped time series.
You can include confidence interval shadow around lines.
type = 3
: Generates a single plot with cumulated time series.
So, the method will sort and overlap the time series values for the selected
variable
type = 4
: ONLY valid for a single species. It generates a bar
plot of the time series.
For the Group 1 and ts = FALSE
, user will select within:
type = 1
: Generates a bar plot of the selected variable by
species, including interval confidence bars.
type = 2
: Generates a boxplot of the selected variable by
species.
The Group 2 refers classes of Group 1 with By
specification (e.g. yieldNBySize
, abundanceByAge
,
biomassByTL
). There are 2 available plot types:
type = 1
: Generates a bar plot of the selected variable by
species. The ...
will be passed to the internal barplot
function.
type = 2
: Generates a plot using image.plot function,
placing the species in the left axis, the By-variable (e.g. Size) on the
bottom and the main variable (e.g. biomass) in a color scale. The ...
will be passed to the internal image.plot function.
Both alpha
and border
controls the opacity and the color of
border, respectively, for polygons, bar plots and box plots. So depending on
the ts
-type
, they will have different default values:
alpha = 0.3
& border = NA
for TS = TRUE
with
type = 1 or 2
.
alpha = 1
& border = TRUE
for Everything else.
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.
units
could be whether a single character vector (currently applied on
classes without By, e.g. osmose.biomass
,
osmose.yieldN
) or a list of length 2 specifying the units for x and y
(currently used with classes with By, e.g.
plot.osmose.biomassBySize
, plot.osmose.yieldNByAge
).
Extra arguments can be passed from plot.default using ...
:
cex
, cex.axis
, border
(useful for polygon,
boxplots and barplots), etc. It is important to notice that,
depending on where the ellipsys is passed, it allows and refuse the use of
certain arguments. For instance, if the selected plot is a bar plot, the
...
will be passed to the internal barplot
call, so if
cex
argument is used, it will create a conflict and an error (a
typical error of using cex
in barplot function).
A graph of an osmose
object.
Criscely Lujan Paredes
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.