| plot_swrc | R Documentation |
Creates a ggplot2 figure showing continuous SWRC predictions
(lines) optionally overlaid with observed data points.
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
)
pred_curves |
A data frame (or tibble) of dense curve predictions,
typically returned by |
obs_points |
Optional data frame of observed data. Must contain
|
curve_col |
Column in |
obs_col |
Column in |
group_col |
Column name used to distinguish individual profiles
in |
facet_row |
Column for facet rows (default |
facet_col |
Column for facet columns (default |
x_limits |
Numeric vector of length 2 for the x-axis (theta)
range (default |
y_limits |
Numeric vector of length 2 for the y-axis (pF)
range (default |
line_colour |
Colour of the predicted curve lines (default
|
point_colour |
Colour of the observed data points (default
|
base_size |
Base font size for |
title |
Plot title (default |
A ggplot object.
pred_curves <- data.frame(
PEDON_ID = rep(c("P1", "P2"), each = 5),
pF = rep(c(0, 1, 2, 3, 4), 2),
theta = c(0.42, 0.36, 0.28, 0.18, 0.08,
0.38, 0.32, 0.25, 0.16, 0.07)
)
plot_swrc(pred_curves, group_col = "PEDON_ID")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.