title: Python Matplotlib ValueError 'num must be 1 <= num <= 2, not 3'
body: <p>I'm still a little new to Matplotlib and the code below is just in a Jupiter Notebook for quick n' dirty practicing, so please forgive the sloppy variable naming and structure. </p>
  
  <p>I have a list of categories (74 in total) but I'm starting off small to see if my code is correct before just loading in all the categories. When I just try any 2 categories everything works as expected, but when I load in a third one (or just > 2), I get this error.</p>
  
  <p>The error: <code>ValueError: num must be 1 &lt;= num &lt;= 2, not 3</code>
  <a href="https://i.stack.imgur.com/XJ1Yb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XJ1Yb.png" alt="enter image description here"></a></p>
  
  <pre><code>def time_stamp_count(category):
      tst = []
      for i in cc_key_val_num:
          for k,v in i.items():
              if k == 'Time':
                  ti = v[:-2]
                  tst.append({ti:0})
              if k == 'LIWC_lib':
                  for x in v:
                      z,q = x
                      if z == category:
                          tst.pop()
                          tst.append({ti:q})
      return tst
  
  
  
  style.use('dark_background')
  fig = plt.figure(figsize=(16, 10))
  
  category_name = ['focusfuture', 'focusfuture', 'focuspresent']
  
  def create_plots(xan):
      xs = []
      ys = []
      for i in xan:
          for k,v in i.items():
              xs.append(k)
              ys.append(v)
      return xs,ys
  
  
  for i,step in zip(range(len(category_name)), category_name):
      i += 1
  
      xox = '21{0}'.format(i)
      xox = int(xox)
  
      ax = fig.add_subplot(xox)
  
      xan = time_stamp_count(step)
      x,y = create_plots(xan)
  
      x_freq = 15
      x_axis = range(len(x))
      my_xticks = np.array(x)
      plt.xticks(x_axis[::x_freq], my_xticks[::x_freq])
  
      ax.plot(x_axis,y, label=step, color='#1dcaff')
      plt.legend(bbox_to_anchor=(1, 1), loc=2, borderaxespad=0.)
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XBeyL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XBeyL.png" alt="enter image description here"></a></p>