title: How to use log scale and log bins for hist2d in Matplotlib?
body: <p>The following minimal example shows my problem:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  X = np.random.normal(30, 10, 1000)
  Y = np.random.normal(200, 500, 1000)
  
  x_space = np.linspace(0, 60, 6)
  print('x_space:', x_space)
  
  y_space = np.logspace(np.log10(1.0), np.log10(1000.0), 30)
  print('y_space:', y_space)
  
  plt.hist2d(X, Y, bins=(x_space, y_space))
  plt.yscale('log')
  plt.show()
  </code></pre>
  
  <p>I expect the bins to be displayed equally-sized in the graph, because the log scale on the y axis and the log space for y should equal out. However this seems to not be the case.</p>
  
  <p><a href="https://i.stack.imgur.com/lPxEQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lPxEQ.png" alt="enter image description here"></a></p>
  
  <p>The text output of the generated bins looks OK to me:</p>
  
  <pre><code>x_space: [ 0. 12. 24. 36. 48. 60.]
  y_space: [   1.            1.268961      1.61026203    2.04335972    2.5929438
      3.29034456    4.17531894    5.29831691    6.72335754    8.53167852
     10.82636734   13.73823796   17.43328822   22.12216291   28.07216204
     35.6224789    45.20353656   57.3615251    72.78953844   92.36708572
    117.21022975  148.73521073  188.73918221  239.502662    303.91953823
    385.66204212  489.39009185  621.01694189  788.04628157 1000.        ]
  </code></pre>
  
  <p>But it does not correspond to what is plotted.</p>
  
  <p>And I doing something wrong, or might this be a bug in the library?</p>
  
  <p>(I'm using Matplotlib version 2.2.2.)</p>