title: How to fix 'numpy.ndarray' object has no attribute 'get_figure' when plotting subplots
body: <p>I have written the following code to plot 6 pie charts in different subplots, but I get an error. This code works correctly if I use it to plot only 2 charts, but produces an an error for anything more than that.</p>
  <p>I have 6 categorical variables in my dataset, the names of which are stored in the list <code>cat_cols</code>. The charts are to be plotted from the training data <code>train</code>.</p>
  <p><strong>CODE</strong></p>
  <pre><code>fig, axes = plt.subplots(2, 3, figsize=(24, 10))
  
  for i, c in enumerate(cat_cols):
    
    train[c].value_counts()[::-1].plot(kind = 'pie', ax=axes[i], title=c, autopct='%.0f', fontsize=18)
    axes[i].set_ylabel('')
      
  plt.tight_layout()
  </code></pre>
  <p><strong>ERROR</strong></p>
  <pre><code>AttributeError: 'numpy.ndarray' object has no attribute 'get_figure'
  </code></pre>
  <p>How do we rectify this?</p>