View source: R/generic_plotting.R
plot_situations | R Documentation |
Plots simulation outputs for one or several situations with or without observations, eventually grouped by a model version (or any group actually).
plot_situations(
...,
obs = NULL,
obs_sd = NULL,
type = c("dynamic", "scatter"),
select_dyn = c("sim", "common", "obs", "all"),
select_scat = c("sim", "res"),
var = NULL,
title = NULL,
all_situations = TRUE,
overlap = NULL,
successive = NULL,
shape_sit = c("none", "txt", "symbol", "group"),
situation_group = NULL,
reference_var = NULL,
force = FALSE,
verbose = TRUE,
formater
)
... |
Simulation outputs (each element= model version), each being a
named list of |
obs |
A list (each element= situation) of observations |
obs_sd |
A list (each element= situation) of standard deviations of
observations |
type |
The type of plot requested, either "dynamic" (date in X, variable in Y) or scatter (simulated VS observed) |
select_dyn |
Which data to plot when |
select_scat |
Which data to plot when |
var |
A vector of variables that should be displayed on the graph. |
title |
A vector of plot titles, named by situation. Use the situation
name if |
all_situations |
Boolean (default = TRUE). If |
overlap |
A list of lists containing the variables to represent on the
same graph when |
successive |
A list of lists containing the situations to be represented
as a contiguous sequence when |
shape_sit |
Shape to differentiate between situations when
|
situation_group |
A list of lists of situations to gather when
|
reference_var |
Variable selected on x-axis when type is scaƩtter and select_scat is res. It is possible to select between observation and simulation of the reference variable. (examples : reference_var = "lai_n_obs", reference_var = "mafruit_sim") |
force |
Continue if the plot is not possible ? E.g. no observations for
scatter plots. If |
verbose |
Boolean. Print information during execution. |
formater |
The function used to format the models outputs and
observations in a standard way. You can design your own function
that format one situation and provide it here (see |
The select_dyn
argument can be:
"sim" (the default): all variables with simulations outputs, and observations when there are some
"common": variables with simulations outputs and observations in common
"obs": all variables with observations, and simulations outputs when there are some
"all": all variables with any observations or simulations outputs
The select_scat
argument can be:
"sim" (the default): plots observations in X and simulations in Y.
"res": plots observations in X and residuals(observations-simulations)in Y.
The shape_sit
argument can be:
"none" (the default): Same shape for all situations.
"txt": Writes the name of the situation above each point.
"symbol": One shape for each situation.
"group": One shape for each group of situations described in
situation_group
.
A (printed) list of ggplot objects, each element being a plot for a situation
The plots titles are given by their situation name.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.