How to plot time-series and bifurcation diagram using Excel and Python
import matplotlib.pyplot as plt
n0=20
K= 60
r=2
T=1000
nt_series = []
r_series= []
while r <4:
n = n0
for t in range(T):
n = r*n*(1-n/K)
if t>900:
nt_series = nt_series + [n]
r_series = r_series + [r]
#print (r_series)
r = r + 0.01
plt.plot (r_series, nt_series, 'o', markersize=0.1)
plt.xlabel("r", fontsize= 18, loc = 'center')
plt.ylabel("Equilibrium population size", fontsize= 14, labelpad=10)
plt.show()