title: TypeError: histogram() got an unexpected keyword argument 'new'
body: <p>I'm having a hard time trying to plot histograms using python, numpy and matplotlib on a mac osx. I had this working perfectly 6 months ago however the same code produces this error:</p>
  
  <pre><code>In [1]: %matplotlib inline
  
  In [2]:import numpy as np
         from numpy.random import randn
         import pandas as pd
         import matplotlib as mpl
         import matplotlib.pyplot as plt
         from scipy import stats
  
         data = randn(75)
         plt.hist(data)
  </code></pre>
  
  <p>Returns the following message:</p>
  
  <pre><code>    ---------------------------------------------------------------------------
      TypeError                                 Traceback (most recent call last)
      &lt;ipython-input-2-fa104aadeee7&gt; in &lt;module&gt;()
        8 
        9 data = randn(75)
  ---&gt; 10 plt.hist(data,bins=20, density=True)
  
       /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/pyplot.pyc in hist(x, bins, range, normed, weights, cumulative, bottom,  histtype, align, orientation, rwidth, log, color, label, hold, **kwargs)
     2339         ax.hold(hold)
     2340     try:
  -&gt; 2341         ret = ax.hist(x, bins, range, normed, weights, cumulative,  bottom,     histtype, align, orientation, rwidth, log, color, label, **kwargs)
     2342         draw_if_interactive()
     2343     finally:
  
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/matplotlib/axes.pyc in hist(self, x, bins, range, normed, weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label, **kwargs)
     7734             # this will automatically overwrite bins,
     7735             # so that each histogram uses the same bins
  -&gt; 7736             m, bins = np.histogram(x[i], bins, weights=w[i],     **hist_kwargs)
     7737             if normed:
     7738                 db = np.diff(bins)
  
  TypeError: histogram() got an unexpected keyword argument 'new''
  </code></pre>
  
  <p>I have attempted to uninstall and reinstall python, ipython, numpy, matplotlib and scipy and install them in <code>/usr/local/bin</code> though the error persists. </p>
  
  <p>Has anyone seen this issue before or would know a possible solution? Thanks</p>