Dec-23-2020, 02:30 PM
fig, ax = plt.subplots() does not really plot the data. It specifies the axes the subplots will be drawn, so it should be outside of the for loop here. It is the ax.plot(x, y) that actually plots the data. You might want to check out some matplotlib subplot demo to see how it works. Good luck!