title: How to remove empty "padding" in matplotlib barh plot?
body: <p>I want to remove/reduce the empty top and bottom <code>padding</code> space (marked with red squares) in the <code>matplotlib.pyplot.barh</code> plot. How can I do it?</p>
  
  <p>Here is an example of my plot:
  <a href="https://i.stack.imgur.com/4W5Gl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/4W5Gl.png" alt="enter image description here"></a></p>
  
  <p>Here is the code:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  from collections import Counter
  import random
  
  
  values = sorted(tags_dic.values())
  labels = sorted(tags_dic, key=tags_dic.get)
  bars = plt.barh(range(len(tags_dic)), values, align='center')
  plt.yticks(range(len(tags_dic)), labels)
  plt.xlabel('Count')
  plt.ylabel('POS-tags')
  plt.grid(True)
  random.shuffle(COLLECTION)
  for i in range(len(tags_dic)):
      bars[i].set_color(COLLECTION[i])
      print COLLECTION[i]
  plt.show()
  </code></pre>
  
  <p>Random test data:</p>
  
  <pre><code>tags_dic = Counter({u'NNP': 521, u'NN': 458, u'IN': 450, u'DT': 415, u'JJ': 268, u'NNS': 244, u'VBD': 144, u'CC': 138, u'RB': 103, u'VBN': 98, u'VBZ': 69, u'VB': 65, u'TO': 64, u'PRP': 57, u'CD': 51, u'VBG': 50, u'VBP': 48, u'PRP$': 26, u'POS': 26, u'WDT': 20, u'WP': 20, u'MD': 19, u'EX': 11, u'WRB': 10, u'JJS': 7, u'RP': 6, u'JJR': 6, u'RBR': 5, u'NNPS': 5, u'FW': 4, u'SYM': 1, u'UH': 1})
  </code></pre>