title: python matplotlib plot hist2d with normalised masked numpy array
body: <p>I want to plot 2d histogram using matplotlib.pyplot.hist2d. As input I have masked numpy.ma arrays. That as such works fine like this:</p>
  
  <pre><code>hist2d (arr1,arr2,cmin=1)
  </code></pre>
  
  <p>However if I want to normalise the arrays, so I get values always between 0 and 1, using the normed=True keyword like this</p>
  
  <pre><code>hist2d (arr1,arr2,cmin=1, normed=True)
  </code></pre>
  
  <p>I get errors</p>
  
  <pre><code>.../numpy/ma/core.py:3791: UserWarning: Warning: converting a masked element to nan.
    warnings.warn("Warning: converting a masked element to nan.")
  .../matplotlib/colorbar.py:561: RuntimeWarning: invalid value encountered in greater
    inrange = (ticks &gt; -0.001) &amp; (ticks &lt; 1.001)
  .../matplotlib/colorbar.py:561: RuntimeWarning: invalid value encountered in less
    inrange = (ticks &gt; -0.001) &amp; (ticks &lt; 1.001)
  .../matplotlib/colors.py:556: RuntimeWarning: invalid value encountered in less
    cbook._putmask(xa, xa &lt; 0.0, -1)
  </code></pre>
  
  <p>Any idea how I can get round this and still get a normalised 2d histogram?</p>