Change grid interval and specify tick labels
There are several problems in your code. First the big ones: You are creating a new figure and a new axes in every iteration of your loop → put fig = plt.figure and ax = fig.add_subplot(1,1,1) outside of the loop. Don’t use the Locators. Call the functions ax.set_xticks() and ax.grid() with the correct keywords. With … Read more