Orbit diagram of Logistic Map

Hello I am trying to Plot the orbit diagram of the famous logistic map to see the change into chaos of the model.
The Code runs fine, but does to produce a Plot som somehow

I followed the Code from this Julia-Github: Orbit Diagrams & PSOS - DynamicalSystems.jl

Also I tried the implementation of this Julia Video: Intro to dynamical systems in Julia - YouTube (27 Min)

My Code is:

ds = Systems.logistic()
i = 1
pvalues = 2:0.001:4
ics = [rand() for m in 1:10]
n = 50
Ttr = 5000
p_index = 1
output = orbitdiagram(ds, i, p_index, pvalues; n = n, Ttr = Ttr)

figure()
for (j, p) in enumerate(pvalues)
    plot(p .* ones(length(output[j])), output[j], lw = 0, marker = "o",
     ms = 0.2, color = "black")
end
xlabel("\$r\$"); ylabel("\$x\$")

Hi, you are using very old resources. Can you please tell me where are you finding these resources from? The documentation you cite is about 3-4 years old.

Please update to DynamicalSystems.jl version 3.1+ (which requires Julia 1.9+) and use the stable documentation:

https://juliadynamics.github.io/DynamicalSystems.jl/stable/

which has a specific section on the orbit diagram:

https://juliadynamics.github.io/DynamicalSystems.jl/stable/visualizations/#Orbit-Diagrams

If you are looking for the function that gives you the orbit diagram numbers instead of a GUI, this is here: Orbit diagrams · ChaosTools.jl (with examples)

1 Like