Learn R Programming

EmpiricalDynamics (version 0.1.2)

plot_phase_1d: 1D Phase Diagram

Description

Creates a phase diagram plotting dZ vs Z, useful for visualizing autonomous dynamics and identifying fixed points.

Usage

plot_phase_1d(
  data,
  z_var,
  dz_var = NULL,
  show_zero_line = TRUE,
  show_fit = TRUE,
  fit_method = "loess"
)

Value

A ggplot object.

Arguments

data

Data frame.

z_var

Name of state variable Z.

dz_var

Name of derivative dZ (auto-constructed if starts with "d_").

show_zero_line

Add horizontal line at dZ = 0?

show_fit

Add nonparametric fit?

fit_method

Method for fit: "loess", "gam", or "spline".

Details

In the phase diagram:

  • Points where the curve crosses dZ = 0 are fixed points

  • Negative slope at crossing indicates stability

  • Positive slope indicates instability