title: module 'matplotlib.pyplot' has no attribute 'patches'
body: <p>I'm trying to annotate precentage in horizontal barplot with matplotlib.
  The problem is that when I try to add the precentage annotation I get error:</p>
  <blockquote>
  <p>&quot;module 'matplotlib.pyplot' has no attribute 'patches'</p>
  </blockquote>
  <p>This is how I try to create the chart:</p>
  <pre><code>import seaborn as sns
  import matplotlib.pyplot as plt
  from matplotlib.gridspec import GridSpec
  %matplotlib inline
  
  
  sns.set(style=&quot;whitegrid&quot;)
  #sns.set_color_codes(&quot;Spectral&quot;)
  
  
  
  plt.figure(2, figsize=(20,15))
  the_grid = GridSpec(2, 2)
  
  plt.subplot(the_grid[0, 1],  title='Original Dataset')
  sns.barplot(x='count',y='land_cover_specific', data=df, palette='Spectral')
  plt.xlabel('Count')
  plt.ylabel('Land cover')
  
  total = len(original)
  print(total)
  
  for p in plt.patches:
          percentage = '{:.1f}%'.format(100 * p.get_width()/total)
          x = p.get_x() + p.get_width() + 0.02
          y = p.get_y() + p.get_height()/2
          plt.annotate(percentage, (x, y))
  
  plt.show()
  </code></pre>
  <p>I get the bar plot but I do not get the annotation due to this error.
  <a href="https://i.stack.imgur.com/jCZ4Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jCZ4Q.png" alt="enter image description here" /></a></p>
  <p>My end goal: to add teh rpecentage of each bar count out of the total</p>