# Orbit diagram of Logistic Map

**URL:** https://discourse.julialang.org/t/orbit-diagram-of-logistic-map/100690
**Category:** Modelling & Simulations
**Tags:** plotting, dynamical-systems
**Created:** [June 22, 2023, 9:10am UTC](https://discourse.julialang.org/t/orbit-diagram-of-logistic-map/100690 "2023-06-22T09:10:35Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SimonNeuroscience](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simonneuroscience/32/50921_2.png) [@SimonNeuroscience](https://discourse.julialang.org/u/SimonNeuroscience)
#### Post date: [June 22, 2023, 9:10am UTC](https://discourse.julialang.org/t/orbit-diagram-of-logistic-map/100690/1 "2023-06-22T09:10:35Z")

</div>

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](https://juliadynamics.github.io/DynamicalSystems.jl/v1.0/chaos/orbitdiagram/)

Also I tried the implementation of this Julia Video: [Intro to dynamical systems in Julia - YouTube](https://www.youtube.com/watch?v=13hqE_1a158) (27 Min)

My Code is:

```julia
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\$")

```

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [June 22, 2023, 9:41am UTC](https://discourse.julialang.org/t/orbit-diagram-of-logistic-map/100690/2 "2023-06-22T09:41:50Z")

</div>

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/](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](https://juliadynamics.github.io/DynamicalSystems.jl/stable/visualizations/#Orbit-Diagrams)

---

<div class="post-metadata">

### Author: ![Datseris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datseris/32/13406_2.png) [@Datseris](https://discourse.julialang.org/u/Datseris)
#### Post date: [June 22, 2023, 9:50am UTC](https://discourse.julialang.org/t/orbit-diagram-of-logistic-map/100690/3 "2023-06-22T09:50:25Z")

</div>

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](https://juliadynamics.github.io/ChaosTools.jl/stable/orbitdiagram/#ChaosTools.orbitdiagram) (with examples)
