title: Matplotlib overlapping tickslabels on log-log plot
body: <p>I can't quite figure out how to ask my question properly.
  I am trying to set custom x,y ticks on a log-log plot.
  Following the answer <a href="https://stackoverflow.com/questions/14530113/set-ticks-with-logarithmic-scale?answertab=votes#tab-top">here</a> I did,</p>
  
  <pre><code>fig1, ax1 = plt.subplots()
  ax1.plot([10, 100, 1000], [1,2,3])
  ax1.set_xscale('log')
  ax1.set_yscale('log')
  ax1.set_xticks([20, 200, 500])
  ax1.set_yticks([1, 2,3])
  ax1.get_xaxis().set_major_formatter
      (matplotlib.ticker.ScalarFormatter())
  ax1.get_yaxis().set_major_formatter
      (matplotlib.ticker.ScalarFormatter())
  </code></pre>
  
  <p>This results in an overlapping ticklabels on of the axis.
  Does anyone knows why is this happening? </p>
  
  <p><a href="https://i.stack.imgur.com/EP0pd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EP0pd.png" alt="output"></a></p>