JuliaDynamics / ChaosTools.jl

Tools for the exploration of chaos and nonlinear dynamics
https://juliadynamics.github.io/DynamicalSystemsDocs.jl/chaostools/stable/
MIT License
188 stars 36 forks source link

'DeterministicIteratedMap' not defined #331

Closed jty-computation closed 5 months ago

jty-computation commented 5 months ago

Describe the bug Attempting run example given in docs: https://juliadynamics.github.io/ChaosTools.jl/stable/orbitdiagram/#ChaosTools.orbitdiagram Running example as given returns "ERROR: LoadError: UndefVarError: DeterministicIteratedMap not defined"

Minimal Working Example

using ChaosTools, CairoMakie

logistic_rule(x, p, n) = @inbounds SVector(p[1]x[1](1-x[1])) logistic = DeterministicIteratedMap(logistic_rule, [0.4], [4.0])

i = 1 parameter = 1 pvalues = 2.5:0.004:4 n = 2000 Ttr = 2000 output = orbitdiagram(logistic, i, parameter, pvalues; n, Ttr)

L = length(pvalues) x = Vector{Float64}(undef, nL) y = copy(x) for j in 1:L x[(1 + (j-1)n):jn] .= pvalues[j] y[(1 + (j-1)n):j*n] .= output[j] end

fig, ax = scatter(x, y; axis = (xlabel = L"r", ylabel = L"x"), markersize = 0.8, color = ("black", 0.05), ) ax.title = "Logistic map orbit diagram" xlims!(ax, pvalues[1], pvalues[end]); ylims!(ax,0,1) fig

Package versions DynamicalSystems v2.1.3 DynamicalSystemsBase v2.3.2 Julia Version 1.10.2

Datseris commented 5 months ago

DynamicalSystems v2.1.3 is too old. We are in v3 land.