title: Pandas dataframe: ValueError: num must be 1 <= num <= 0, not 1
body: <p>I am getting the following error while I am trying to plot a <code>pandas dataframe</code>:</p>
  
  <blockquote>
    <p>ValueError: num must be 1 &lt;= num &lt;= 0, not 1</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  names = ['buying', 'maint', 'doors', 'persons', 'lug_boot', 'safety']
  custom = pd.DataFrame(x_train)  //only a portion of the csv
  custom.columns = names
  custom.hist()
  plt.show()
  </code></pre>
  
  <p>I have tried to read the file again from the <code>csv</code> and I am getting the exact same error.</p>
  
  <p>Edit:</p>
  
  <p><code>print x_train</code> output:</p>
  
  <blockquote>
    <p>[[0.0 0.0 0.0 0.0 0.0 0.0]</p>
    
    <p>[1.0 1.0 0.0 0.0 0.0 0.0]</p>
    
    <p>[0.0 0.0 0.0 0.0 0.0 0.0]</p>
    
    <p>..., </p>
    
    <p>[0.0 0.0 0.0 0.0 0.0 0.0]</p>
    
    <p>[0.3333333333333333 0.3333333333333333 2.0 2.0 2.0 2.0]</p>
    
    <p>[0.0 0.0 3.0 3.0 3.0 3.0]]</p>
  </blockquote>
  
  <p>Edit2:</p>
  
  <p>Complete list of errors(Traceback): </p>
  
  <blockquote>
    <p>Traceback (most recent call last):</p>
    
    <p>File "temp.py", line 104, in 
        custom.dropna().hist()</p>
    
    <p>File "/home/kostas/anaconda2/lib/python2.7/site-packages/pandas/tools/plotting.py", line 2893, in hist_frame
        layout=layout)</p>
    
    <p>File "/home/kostas/anaconda2/lib/python2.7/site-packages/pandas/tools/plotting.py", line 3380, in _subplots
        ax0 = fig.add_subplot(nrows, ncols, 1, **subplot_kw)</p>
    
    <p>File "/home/kostas/anaconda2/lib/python2.7/site-packages/matplotlib/figure.py", line 1005, in add_subplot
        a = subplot_class_factory(projection_class)(self, *args, **kwargs)</p>
    
    <p>File "/home/kostas/anaconda2/lib/python2.7/site-packages/matplotlib/axes/_subplots.py", line 64, in <strong>init</strong>
        maxn=rows*cols, num=num))</p>
  </blockquote>