Created
February 26, 2020 19:46
-
-
Save mechamug/11771c22935a67f132f2ede437857823 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
from scipy.interpolate import make_interp_spline as mis | |
import numpy as np | |
it = 5000 | |
rr = np.arange(2.8, 3.7, 0.01) | |
for x in np.arange(0.1, 1.0, 0.01): | |
xx = [] | |
for r in rr: | |
xn = x | |
for _ in range(it): xn = r * xn * (1 - xn) | |
xx.append(xn) | |
xx = np.array(xx) | |
xs = np.linspace(rr.min(), rr.max(), len(rr) * 5) | |
rs = mis(rr, xx, k=3)(xs) | |
plt.plot(xs, rs, linewidth=0.5) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment