plot_results: Master Function for Plotting Hydrological Model Results

View source: R/plot_results.R

plot_resultsR Documentation

Master Function for Plotting Hydrological Model Results

Description

The function plot_results consolidates the plotting capabilities for hydrological model outputs, Pareto-optimal front solutions, and parameter sensitivity analyses. It calls three subordinate functions (plot_out, plot_pof, plot_param) to generate the required plots, offering a comprehensive visualization tool for model evaluation and optimization results.

(*): When do.png == TRUE, graphics are written to disk.

Usage

plot_results(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.out = 0.25,
             cex.pt.pof = 1.25,
             cex.pt.param = 1, 
             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",
             pof = NULL,
             maxmin = NULL,
             obj.thr = NULL,
             pch.pof = 21,
             col.pof = "#f21b1b",
             legend.pof = c("Pareto-optimal front solutions", 
                            "Best compromise solution"),
             legend.param = NULL,
             col = NULL,
             col.param = NULL,
             col.lines = NULL,
             name.param = NULL,
             cex.leg = 1)

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.out

(numeric)
Size of points in the "out" plots.

cex.pt.pof

(numeric)
Size of points in the "pof" plots.

cex.pt.param

(numeric)
Size of points in the "param" 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.

pof

(matrix or NULL)
Dataset representing the filled Pareto-optimal front (POF) solutions.

maxmin

(character or NULL)
Indicator of whether objectives are to be maximized ("max") or minimized ("min").

obj.thr

(numeric or NULL)
Objective thresholds.

pch.pof

(integer)
Symbol type for points in the plot representing the Pareto-optimal front solutions.

col.pof

(character)
Color used for the points representing the Pareto-optimal front solutions in the plots.

legend.pof

(character)
Legend text for the Pareto-optimal front and best compromise solution.

legend.param

(character or NULL)
Legend text for the parameters in the plots.

col

(character or NULL)
Colors used for points in the parameter dotty plots.

col.param

(character or NULL)
Specific colors for lines or points representing parameters in the parameter boxplots.

col.lines

(character or NULL)
Specific colors for lines in the parameter boxplots.

name.param

(character or NULL)
Custom names for the parameters to be plotted.

cex.leg

(numeric)
Size of the legend text in the plots.

Value

No return value; generates plots as a side effect.

Author(s)

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

See Also

plot_out, plot_pof, plot_param


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