Plot methods for a range of sspm objects.
# S4 method for sspm_boundary,missing
plot(x, y, ...)
# S4 method for sspm_dataset,missing
plot(
x,
y,
...,
var = NULL,
point_size = 1,
line_size = 1,
use_sf = FALSE,
interval = FALSE,
page = "first",
nrow = 2,
ncol = 2,
log = FALSE,
scales = "fixed",
show_PI = TRUE,
show_CI = TRUE
)
# S4 method for sspm_fit,missing
plot(
x,
y,
...,
point_size = 1,
line_size = 1,
train_test = FALSE,
biomass = NULL,
next_ts = FALSE,
smoothed_biomass = FALSE,
aggregate = FALSE,
interval = FALSE,
biomass_origin = NULL,
use_sf = FALSE,
page = "first",
nrow = 2,
ncol = 2,
log = FALSE,
scales = "fixed",
show_PI = TRUE,
show_CI = TRUE
)
[sspm_...] An object from this package.
NOT USED (from generic).
NOT USED (from generic).
[character] (For sspm_dataset) Variable to plot.
[numeric] Passed on to ggplot size parameter for point size.
[numeric] Passed on to ggplot size parameter for line size.
[logical] Whether to produce a spatial plot.
[logical] (For sspm_fit & sspm_dataset) Whether to plot CI and PI intervals.
The page to draw
Number of rows per page
Number of columns per page
[logical] For productivity, whether to plot log productivity, (default to FALSE) for others, whether to plot on a log scale (default to TRUE).
Are scales shared across all facets (the default,
"fixed"
), or do they vary across rows ("free_x"
),
columns ("free_y"
), or both rows and columns ("free"
)?
[character] Whether to show the PIs.
[character] Whether to show the CIs.
[logical] (For sspm_fit) Whether to plot a train/test pair plot.
[character] (For sspm_fit) The biomass variable for predictions.
[logical] (For sspm_fit) Whether to plot a predictions for next timestep.
[logical] (For sspm_fit) Whether to plot a the smoothed biomass used for predictions.
[logical] (For sspm_fit) For biomass predictions only, whether to aggregate the data to the boundary level. Default to FALSE.
[character] Biomass variable to plot (from original dataset, optionnal).
A ggplot2 plot object.
if (FALSE) {
# To plot a boundary object and visualize patches/points
plot(sspm_boundary)
# To plot a dataset variable
plot(biomass_smooth, var = "weight_per_km2", log = FALSE)
plot(biomass_smooth, var = "weight_per_km2", use_sf = TRUE)
# To plot a fitted model
# Test-train plot
plot(sspm_model_fit, train_test = TRUE, scales = "free")
# Timeseries plot
plot(sspm_model_fit, log = T, scales = 'free')
plot(sspm_model_fit, log = T, use_sf = TRUE)
plot(sspm_model_fit, biomass = "weight_per_km2_borealis", scales = "free")
plot(sspm_model_fit, biomass = "weight_per_km2_borealis", use_sf = TRUE)
plot(sspm_model_fit, biomass = "weight_per_km2_borealis",
next_ts = TRUE, aggregate = TRUE, scales = "free", interval = T)
}