Figure 2.23:

Bifurcation diagram for the transcritical bifurcation.

Code for Figure 2.23

Text of the GNU GPL.

main.py


1
2
3
4
5
6
7
8
9
import numpy as np
import matplotlib.pyplot as plt

points = np.array([[-1, 0, 0, 0, -1, -1, 0, 0], [0, 0, 1, 1, 0, 0, 1, 0]])
with open("transcritm.dat", "w") as f:
    np.savetxt(f, points, fmt='%f')

plt.plot(points[0], points[1])
plt.show(block=False)