title: matplotlib is ignoring locator_params nticks command
body: <p>I'm trying to make a plot with four ticks on each axes. Here is the code:</p>
  
  <pre><code>ax0 = pyplot.gca()
  cmap = pyplot.cm.get_cmap('RdYlBu', 9)
  vmin=0.75
  vmax=5.25
  sc = pyplot.scatter(X[idx, 0], X[idx, 1], c=colors[idx], vmin=vmin,
                      vmax=vmax, s=30, cmap=cmap)
  
  pyplot.colorbar(sc, ticks=[1.0, 2.0, 3.0, 4.0, 5.0])
  ax0.locator_params(tight=True, nticks=4)
  ax0.set_ylim([-1.0, 1.0])
  ax0.set_xlim([-1.0, 1.0])
  ax0.axis('equal')
  pyplot.show()
  </code></pre>
  
  <p>This is the resulting image</p>
  
  <p><a href="https://i.stack.imgur.com/niSpQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/niSpQ.png" alt="scatter plot"></a></p>
  
  <p>As you can see it ignores both the locator_params and the set_xlim/set_ylim commands. How can I fix it?</p>