title: 2D histogram with Python
body: <p>I'm trying to plot a 2D histogram in Python using these code</p>
  
  <pre><code>from math import *
  import pylab as p
  import matplotlib.pyplot as plt
  import numpy as np
  
  x=part.points[:,0]
  y=part.points[:,1]
  z=part.points[:,2]
  
  H, xedges, yedges = np.histogram2d(x, y, bins=(128,128))
  H.shape, xedges.shape, yedges.shape
  
  extent = [yedges[0], yedges[-1], xedges[-1], xedges[0]]
  
  plt.imshow(H, extent=extent, interpolation='nearest')
  
  plt.colorbar()
  plt.xlabel("x")
  plt.ylabel("y")
  plt.show()
  </code></pre>
  
  <p>Every thing works fine: I have a color bar which represent the counts in each cells. The thing is that I would like to have the log of the count but the function histrogram2d does not have any option for that.</p>