plot | R Documentation |
sspm
objectsPlot methods for a range of sspm objects.
## S4 method for signature 'sspm_boundary,missing'
plot(x, y, ...)
## S4 method for signature '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 signature '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
)
x |
[sspm_...] An object from this package. |
y |
NOT USED (from generic). |
... |
NOT USED (from generic). |
var |
[character] (For sspm_dataset) Variable to plot. |
point_size |
[numeric] Passed on to ggplot size parameter for point size. |
line_size |
[numeric] Passed on to ggplot size parameter for line size. |
use_sf |
[logical] Whether to produce a spatial plot. |
interval |
[logical] (For sspm_fit & sspm_dataset) Whether to plot CI and PI intervals. |
page |
The page to draw |
nrow |
Number of rows per page |
ncol |
Number of columns per page |
log |
[logical] For productivity, whether to plot log productivity, (default to FALSE) for others, whether to plot on a log scale (default to TRUE). |
scales |
Are scales shared across all facets (the default,
|
show_PI |
[character] Whether to show the PIs. |
show_CI |
[character] Whether to show the CIs. |
train_test |
[logical] (For sspm_fit) Whether to plot a train/test pair plot. |
biomass |
[character] (For sspm_fit) The biomass variable for predictions. |
next_ts |
[logical] (For sspm_fit) Whether to plot a predictions for next timestep. |
smoothed_biomass |
[logical] (For sspm_fit) Whether to plot a the smoothed biomass used for predictions. |
aggregate |
[logical] (For sspm_fit) For biomass predictions only, whether to aggregate the data to the boundary level. Default to FALSE. |
biomass_origin |
[character] Biomass variable to plot (from original dataset, optionnal). |
A ggplot2 plot object.
## Not run:
# 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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.