title: plot histogram matplotlib with labels on x axis instead of count
body: <p>I'm looking to plot a histogram using <code>value_counts()</code> or some equivalent, in python. My data looks like:</p>
  
  <pre><code>Lannister                      8
  Stark                          8
  Greyjoy                        7
  Baratheon                      6
  Frey                           2
  Bolton                         2
  Bracken                        1
  Brave Companions               1
  Darry                          1
  Brotherhood without Banners    1
  Free folk                      1
  Name: attacker_1, dtype: int64
  </code></pre>
  
  <p>You could use any reproducible code like:</p>
  
  <pre><code>pd.DataFrame({'Family':['Lannister', 'Stark'], 'Battles':[6, 8]})
  </code></pre>
  
  <p>I'm using </p>
  
  <pre><code>plt.hist(battles.attacker_1.value_counts())
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/W4gr5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W4gr5.png" alt="histogram"></a></p>
  
  <p>I would like the x axis to show the family names, instead of the number of battles, and I would like the number of battles to be the histogram piece. I tried using just a series of the family names (with Lannister repeating 8 times) instead of using <code>value_counts()</code> and thought that might work, but I'm not sure how else to do this.</p>