Creates a ggplot2 figure showing continuous SWRC predictions
(lines) optionally overlaid with observed data points.
Usage
plot_swrc(
pred_curves,
obs_points = NULL,
curve_col = "theta",
obs_col = "theta_n",
group_col = "PEDON_ID",
facet_row = NULL,
facet_col = NULL,
x_limits = NULL,
y_limits = c(-0.25, 7.75),
line_colour = "steelblue4",
point_colour = "black",
base_size = 12,
title = NULL
)Arguments
- pred_curves
A data frame (or tibble) of dense curve predictions, typically returned by
predict_swrc_dense(). Must contain columnspFandtheta.- obs_points
Optional data frame of observed data. Must contain
pFandthetacolumns (ormatric_headand a theta column).- curve_col
Column in
pred_curvesfor the predicted theta (default"theta").- obs_col
Column in
obs_pointsfor observed theta (default"theta_n").- group_col
Column name used to distinguish individual profiles in
pred_curves(default"PEDON_ID").- facet_row
Column for facet rows (default
NULL).- facet_col
Column for facet columns (default
NULL).- x_limits
Numeric vector of length 2 for the x-axis (theta) range (default
NULL, auto).- y_limits
Numeric vector of length 2 for the y-axis (pF) range (default
c(-0.25, 7.75)).- line_colour
Colour of the predicted curve lines (default
"steelblue4").- point_colour
Colour of the observed data points (default
"black").- base_size
Base font size for
theme_bw(default12).- title
Plot title (default
NULL).
