title: ValueError: num must be 1 <= num <= 2, not 3
body: <p>I have the following <code>dataframe</code> that I generated using <code>pivot_table</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/5tEeL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5tEeL.png" alt="enter image description here"></a></p>
  
  <p>and I'm using the following code to <code>boxplot</code> the multiple columns:</p>
  
  <pre><code>    fig = plt.figure()
  for i in range(0,25):
      ax = plt.subplot(1,2,i+1)
      toPlot1.boxplot(column='Score',by=toPlot1.columns[i+1],ax=ax)
  fig.suptitle('test title', fontsize=20)
  plt.show()
  </code></pre>
  
  <p>I was expecting an output like the following:</p>
  
  <p><a href="https://i.stack.imgur.com/qtzE2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qtzE2.png" alt="enter image description here"></a></p>
  
  <p>But this code gives me the following error:</p>
  
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-275-9c68ce91596f&gt; in &lt;module&gt;()
        1 fig = plt.figure()
        2 for i in range(0,25):
  ----&gt; 3     ax = plt.subplot(1,2,i+1)
        4     toPlot1.boxplot(column='Score',by=toPlot1.columns[i+1],ax=ax)
        5 fig.suptitle('test title', fontsize=20)
  
  E:\Anaconda2\lib\site-packages\matplotlib\pyplot.pyc in subplot(*args, **kwargs)
     1020 
     1021     fig = gcf()
  -&gt; 1022     a = fig.add_subplot(*args, **kwargs)
     1023     bbox = a.bbox
     1024     byebye = []
  
  E:\Anaconda2\lib\site-packages\matplotlib\figure.pyc in add_subplot(self, *args, **kwargs)
     1003                     self._axstack.remove(ax)
     1004 
  -&gt; 1005             a = subplot_class_factory(projection_class)(self, *args, **kwargs)
     1006 
     1007         self._axstack.add(key, a)
  
  E:\Anaconda2\lib\site-packages\matplotlib\axes\_subplots.pyc in __init__(self, fig, *args, **kwargs)
       62                     raise ValueError(
       63                         "num must be 1 &lt;= num &lt;= {maxn}, not {num}".format(
  ---&gt; 64                             maxn=rows*cols, num=num))
       65                 self._subplotspec = GridSpec(rows, cols)[int(num) - 1]
       66                 # num - 1 for converting from MATLAB to python indexing
  
  ValueError: num must be 1 &lt;= num &lt;= 2, not 3
  </code></pre>
  
  <p>I believe it's because there can only be 2 boxplots on one graph? </p>
  
  <p>Any idea on how to fix this? Any pointers would be highly appreciated.</p>
  
  <p>TIA.</p>