plot_out: Plotting observed vs. simulated data and uncertainty bands

View source: R/plot_out.R

plot_outR Documentation

Plotting observed vs. simulated data and uncertainty bands

Description

The function plot_out takes the optimization/calibration or verification results of a hydrological model and generates the following plots:

(*): When do.png == TRUE, graphics are written to disk.
(**): Multiple graphs are generated corresponding to the targets specified in the optimization process.

  1. ModelOut_BCS_from_Pareto_Optimal_Front_vs_Obs: A graphical comparison of time series for observed and simulated variables, using the simulation of the best compromise solution.

  2. ModelOut_from_Pareto_Optimal_Front: An uncertainty band that encompasses the simulations given by all the solutions on the Pareto Optimal Front, displayed in a time series. The time series of the best compromise solution is also distinguished.

  3. ModelOut_from_Pareto_Optimal_Front_vs_Obs: A graphical comparison of time series for observed and simulated variables, using an uncertainty band that encompasses the simulations given by all solutions on the Pareto Optimal Front.

Usage

plot_out(Results,
         model.out = NULL,
         analysis.period = NULL, 
         model.out.bcs = NULL, 
         bcs = NULL, 
         obs.var = NULL,
         dimensions = NULL,
         obj.names = NULL,
         dates.cal = NULL, 
         dates.warmup = NULL, 
         var.names = NULL,
         var.units = NULL,
         xlim = NULL,
         ylim = NULL,
         digits = 4,
         col.band = "skyblue",
         col.bcs = "mediumblue",
         col.obs = "black",
         lwd = 0.75,
         pch.bcs = 15,
         pch.obs = 15,
         main = "study case #1",
         drty.out = "MOPSO.out",
         cex.pt = 0.25, 
         cex.main = 1,
         cex.lab = 1,
         cex.axis = 1,
         do.png = FALSE,
         legend.obs = "Observation",
         legend.bcs = "Best compromise solution",
         legend.band = "Pareto front bands")

Arguments

Results

(list)
Object containing preprocessed hydrological results.

model.out

(list or NULL)
Output from the hydrological model used for evaluation.

analysis.period

(character or NULL)
Time period for analysis (e.g., "calibration" or "verification").

model.out.bcs

(list or NULL)
Model output representing the "Best Compromise Solution" (BCS).

bcs

(matrix or NULL)
Parameters or results corresponding to the best compromise solution (BCS).

obs.var

(list or NULL)
Observed variables to be compared against the model outputs.

dimensions

(matrix or NULL)
Dimensions of the modeled problem, typically indicating the number of objectives and variables.

obj.names

(character or NULL)
Names of the objectives.

dates.cal

(Date or NULL)
Dates of the calibration period.

dates.warmup

(Date or NULL)
Dates of the model's warm-up period.

var.names

(character or NULL)
Names of the modeled and observed variables.

var.units

(character or NULL)
Units of the modeled and observed variables.

xlim

(numeric or NULL)
Limits for the x-axis in the plots.

ylim

(numeric or NULL)
Limits for the y-axis in the plots.

digits

(integer)
Number of digits to use for rounding values in plots and legends.

col.band

(character)
Color used for the model uncertainty bands in the plots.

col.bcs

(character)
Color used for the line representing the best compromise solution (BCS).

col.obs

(character)
Color used for the observed variable lines in the plots.

lwd

(numeric)
Line width used in the plots for model and observation lines.

pch.bcs

(integer)
Symbol type for points in the plot representing the best compromise solution (BCS).

pch.obs

(integer)
Symbol type for points in the plot representing the observations.

main

(character)
Main title for the plot.

drty.out

(character)
Output directory where plots will be saved if specified to save as PNG files.

cex.pt

(numeric)
Size of points in the plots.

cex.main

(numeric)
Size of the main title text in the plot.

cex.lab

(numeric)
Size of the axis label text in the plots.

cex.axis

(numeric)
Size of the axis values text in the plots.

do.png

(logical)
Boolean value indicating whether the plots should be saved as PNG files.

legend.obs

(character)
Legend text for observations.

legend.bcs

(character)
Legend text for the best compromise solution (BCS).

legend.band

(character)
Legend text for Pareto front bands.

Value

No return value; generates plots.

Author(s)

Rodrigo Marinao Rivas ra.marinao.rivas@gmail.com, Mauricio Zambrano-Bigiarini, mzb.devel@gmail.com

See Also

hydroMOPSO


hydroMOPSO documentation built on June 18, 2025, 9:15 a.m.