fig, axes = plt.subplots(nrows=2)
for i in range(10):
    axes[0].plot(x, i * (x - 10) ** 2)
for i in range(10):
    axes[1].plot(x, i * np.cos(x))
plt.show()
How to set the default color cycle for all subplots with matplotlib?