I'm trying to control the number of tick marks on my graphs using locator params. I want a graph that has five vertical lines plus the two edges of the graphs (ie 7 values total on the x and y axes).
I've been using locator params and trying to set nbins = 7, but that doesn't work. Unless I use extreme values, like nbins = 12 or nbins = 3, nothing changes on my graphs and I don't understand why.
Here is some of my code:
gs1 = gridspec.GridSpec(3,3)
ax6 = plt.subplot(gs1[-1,-1])
q=np.arange(79.9,80.1,1e-4)
ax6.plot(q, np.exp(-((q-80)**2)/(2*sig_gauss[2]**2)),'k')
ax6.grid()
ax6.locator_params(axis = 'y',nbins=7)
ax6.locator_params(axis = 'x',nbins=7)
ax6.set_xlim(79.9,80.1)
I don't understand why changing the number of nbins only works sometimes.