Creates a phase diagram plotting dZ vs Z, useful for visualizing autonomous dynamics and identifying fixed points.
plot_phase_1d(
data,
z_var,
dz_var = NULL,
show_zero_line = TRUE,
show_fit = TRUE,
fit_method = "loess"
)A ggplot object.
Data frame.
Name of state variable Z.
Name of derivative dZ (auto-constructed if starts with "d_").
Add horizontal line at dZ = 0?
Add nonparametric fit?
Method for fit: "loess", "gam", or "spline".
In the phase diagram:
Points where the curve crosses dZ = 0 are fixed points
Negative slope at crossing indicates stability
Positive slope indicates instability