title: Matplotlib set_xticklabels misaligned
body: <p>I have a double y-axis plot and I can't get the xticks labels working.<br>
  This is when I don't modify the xticks:
  <a href="https://i.stack.imgur.com/ip6zz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ip6zz.png" alt="enter image description here"></a>
  This is when I do:
  <a href="https://i.stack.imgur.com/zPULP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zPULP.png" alt="enter image description here"></a></p>
  
  <pre><code>neurons = [4, 8, 16, 32, 64, 128]
  fig, ax = plt.subplots(figsize=(13,7))
  ax2 = ax.twinx()
  # adding the plots
  ax.grid(False)
  ax2.grid(False)
  ax.set_xticklabels(neurons)
  ax.set_yticklabels(np.arange(250, 2500,250),fontsize=14)
  ax2.set_yticklabels(np.arange(0, 120,20),fontsize=14)
  ax.set_ylabel('Training time [s]', fontsize=18)
  ax2.set_ylabel('Model avg accuracy [%]', fontsize=18)
  ax.set_xlabel('Number of neurons', fontsize=18)
  ax2.legend(fontsize=15)
  plt.show()
  </code></pre>