title: How to display log scale on data that are already in log?
body: <p>I have some logarithmic data:</p>
  <pre><code>x = np.log2(np.random.randint(1, 100000, size=100))
  y = np.log2(np.random.randint(1, 100000, size=100))
  </code></pre>
  <p>If I display it I don't get log scales:</p>
  <pre><code>plt.scatter(x, y)
  plt.grid() 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/b4LHO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b4LHO.png" alt="enter image description here" /></a></p>
  <p>Instead I want the same dataset to be plotted with a logarithmic grid. The only way I've found is this one:</p>
  <pre><code>plt.scatter(2**x, 2**y)
  plt.yscale(&quot;log&quot;)
  plt.xscale(&quot;log&quot;)
  plt.grid(b=True, which='major', color='#666666', linestyle='-')
  plt.minorticks_on()
  plt.grid(b=True, which='minor', color='#999999', linestyle='-', alpha=0.2)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/LEPF9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LEPF9.png" alt="enter image description here" /></a></p>
  <p>Any better option?</p>