title: matplotlib polar 2d histogram
body: <p>I am trying to plot some histogrammed data on a polar axis but it wont seem to work properly. An example is below, I use the custom projection found  <a href="https://stackoverflow.com/questions/2417794/how-to-make-the-angles-in-a-matplotlib-polar-plot-go-clockwise-with-0-at-the-to">How to make the angles in a matplotlib polar plot go clockwise with 0&#176; at the top?</a> it works for a scatter plot so I think my problem is with the histogram function. This has been driving me nuts all day, does anyone know what I am doing wrong...........</p>
  
  <pre><code>import random
  import numpy as np
  import matplotlib.pyplot as plt
  
  baz = np.zeros((20))
  freq = np.zeros((20))
  pwr = np.zeros((20))
  for x in range(20): 
      baz[x] = random.randint(20,25)*10
      freq[x] = random.randint(1,10)*10
      pwr[x] = random.randint(-10,-1)*10
  baz = baz*np.pi/180.  
  
  abins = np.linspace(0,2*np.pi,360)      # 0 to 360 in steps of 360/N.
  sbins = np.linspace(1, 100) 
  H, xedges, yedges = np.histogram2d(baz, freq, bins=(abins,sbins), weights=pwr)
  
  plt.figure(figsize=(14,14))
  plt.subplot(1, 1, 1, projection='northpolar')
  #plt.scatter(baz, freq)
  plt.pcolormesh(H)
  plt.show()
  </code></pre>