Interactive Cobweb Diagram

InteractiveDynamics.interactive_cobwebFunction
interactive_cobweb(ds::DiscreteDynamicalSystem, prange, O::Int = 3; kwargs...)

Launch an interactive application for exploring cobweb diagrams of 1D discrete dynamical systems. Two slides control the length of the plotted trajectory and the current parameter value. The parameter values are obtained from the given prange.

In the cobweb plot, higher order iterates of the dynamic rule f are plotted as well, starting from order 1 all the way to the given order O. Both the trajectory in the cobweb, as well as any iterate f can be turned off by using some of the buttons.

Keywords

  • Ttr = 0: transient amount of time to evolve before plotting
  • fkwargs = [(linewidth = 4.0, color = randomcolor()) for i in 1:O]: plotting keywords for each of the plotted iterates of f
  • trajcolor = randomcolor(): color of the trajectory
  • pname = "p": name of the parameter slider
  • pindex = 1: parameter index
  • xmin = 0, xmax = 1: limits the state of the dynamical system can take
  • Tmax = 1000: maximum trajectory length
source

The animation at the top of this page was done with

using InteractiveDynamics, GLMakie, DynamicalSystems

# the second range is a convenience for intermittency example of logistic
rrange = 1:0.001:4.0
# rrange = (rc = 1 + sqrt(8); [rc, rc - 1e-5, rc - 1e-3])

lo = Systems.logistic(0.4; r=rrange[1])

interactive_cobweb(lo, rrange, 5)