title: Matplotlib/Pandas error using histogram
body: <p>I have a problem making histograms from pandas series objects and I can't understand why it does not work. The code has worked fine before but now it does not.</p>
  
  <p>Here is a bit of my code (specifically, a pandas series object I'm trying to make a histogram of):</p>
  
  <pre><code>type(dfj2_MARKET1['VSPD2_perc'])
  </code></pre>
  
  <p>which outputs the result: 
      <code>pandas.core.series.Series</code></p>
  
  <p>Here's my plotting code:</p>
  
  <pre><code>fig, axes = plt.subplots(1, 7, figsize=(30,4))
  axes[0].hist(dfj2_MARKET1['VSPD1_perc'],alpha=0.9, color='blue')
  axes[0].grid(True)
  axes[0].set_title(MARKET1 + '  5-40 km / h')
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>    AttributeError                            Traceback (most recent call last)
      &lt;ipython-input-75-3810c361db30&gt; in &lt;module&gt;()
        1 fig, axes = plt.subplots(1, 7, figsize=(30,4))
        2 
      ----&gt; 3 axes[1].hist(dfj2_MARKET1['VSPD2_perc'],alpha=0.9, color='blue')
        4 axes[1].grid(True)
        5 axes[1].set_xlabel('Time spent [%]')
  
      C:\Python27\lib\site-packages\matplotlib\axes.pyc in hist(self, x, bins, range, normed,          weights, cumulative, bottom, histtype, align, orientation, rwidth, log, color, label,    stacked, **kwargs)
     8322             # this will automatically overwrite bins,
     8323             # so that each histogram uses the same bins
  -&gt; 8324             m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
     8325             m = m.astype(float) # causes problems later if it's an int
     8326             if mlast is None:
  
      C:\Python27\lib\site-packages\numpy\lib\function_base.pyc in histogram(a, bins, range,     normed, weights, density)
      158         if (mn &gt; mx):
      159             raise AttributeError(
  --&gt; 160                 'max must be larger than min in range parameter.')
      161 
      162     if not iterable(bins):
  
  AttributeError: max must be larger than min in range parameter.
  </code></pre>