English: Produced by the following code, adapted from code from Wikipedia article Logistic map:
import numpy as np
import math
import matplotlib.pyplot as plt
preset = 1
saveFigure = True
markerSize = 0.01
markerStyle = "," # . - point; , - pixel
if preset == 1: # Cover the whole range [-2, 2]
cInterval = (-2.1, 2.1)
cResolution = 0.0005
mapIterationCount = 500
lastMapIterationCountToPlot = 500
startingIterationValue = 0.5
fileName = "TentMapOrbitDiag.png"
yLim = (-1.1, 2.5)
elif preset == 2: # Zoom on the period-doubling bifurcation region
cInterval = (0.99, 1.1)
cResolution = 0.00002
mapIterationCount = 500
lastMapIterationCountToPlot = 500
startingIterationValue = 0.5
fileName = "TentMapOrbitDiag_BifurcZoom.png"
yLim = (0.45, 0.54)
lims = np.zeros(mapIterationCount)
fig, biax = plt.subplots()
fig.set_size_inches(16, 9)
for c in np.arange(cInterval[0], cInterval[1], cResolution):
lims[0] = startingIterationValue
for i in xrange(mapIterationCount - 1):
lims[i + 1] = c * min(lims[i], 1 - lims[i])
biax.plot([c] * lastMapIterationCountToPlot,
lims[(mapIterationCount - lastMapIterationCountToPlot):], "b.",
markersize=markerSize,
marker=markerStyle)
biax.set(xlabel="c", ylabel="x",
title="Tent map - c * min(x, 1-x) - bifurcation diagram/orbit diagram" + "\n"
"c resolution: " + str(cResolution) +
", iteration count: " + str(mapIterationCount) +
", last values to plot count: " + str(lastMapIterationCountToPlot))
biax.set_ylim(yLim[0], yLim[1])
if saveFigure:
plt.savefig(fileName, dpi=600)
else:
plt.show()