I want to create a Bifurcation Diagram with the Logistic Map and I have open questions about the correct algorithm. Here is how I understood it so far:
- logistic map $x_{i+1} = rx_{i}(1-x_{i})$
- take a start population, e.g. $x_{0} = 0.5$
- generate multiple growth rate values evenly distributed between 0.0 and 4.0, e.g. $r = 3.5$
- define a number of iterations (generations), e.g. $i = 200$
- for each growth rate $r$ from 0.0 to 4.0, run the logistic map with start value $x_{0}$ for $i$ iterations
- draw a point for $r$ on the x-axis and $x_{i}$ on the y-axis
Where the confusion sets in: do I need to draw a point for each iteration (values of $x_{1} .. x_{200}$) or just for the final iteration (value of $x_{200}$)?
When I draw all iterated $x_{i}$ values for each growth rate $r$ I get the following diagram:

When I draw the last iterated $x_{200}$ value for each growth rate $r$ I get the following diagram:
But what I actually want to get is the following diagram:
Where is my error?


Your issue is in the starting value $x_0$ - it takes time for this value to settle into a stable value or become chaotic. Try iterating without drawing the values to about $x_{10}$ to $x_{50}$, then draw all the iterations like in your first image. This should generate the proper map.