title: matplotlib chart - creating horizontal bar chart
body: <p>I have stumbled accross the following snippet, for creating horizontal bar chart using matplotlib:</p>
  
  <pre><code>import matplotlib
  from pylab import *
  
  val = 3+10*rand(5)    # the bar lengths
  pos = arange(5)+.5    # the bar centers on the y axis
  print pos
  figure(1)
  barh(pos,val, align='center')
  yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
  xlabel('Performance')
  title('horizontal bar chart using matplotlib')
  grid(True)
  show()
  </code></pre>
  
  <p>I want to modify the above script as follows:</p>
  
  <ol>
  <li>Make the plotted bars 'less chunky' (i.e. reduce the height of the plotted horiz bars)</li>
  <li>Plot both negative and positive numbers as horizontal bars on the same plot</li>
  </ol>
  
  <p>any help (code snippet or links) to help me make the above modifications would be very helpful.</p>
  
  <p>as an aside, if I wanted to make stacked horizontal bars (say each label had 3 stacked horizontal bars), how would I modify the code above to do plot a 3 stacked horizontal bar plot?</p>
  
  <p><strong>[[Edit]]</strong></p>
  
  <p>Could someone post two short code snippet that shows how to:</p>
  
  <ol>
  <li><p>Print labels on the opposite side of the horizontal bars (so that for example, the label for 'negative' bars appears in the 1st quarant, and the labels for 'positive' bars appears in the 2nd quadrant</p></li>
  <li><p>Plot multiple (say 2 or 3) horizontal bars (instead of just one). Good examples are the <a href="https://www.google.co.uk/search?q=multiple%20horizontal%20bar%20chart&amp;hl=en&amp;prmd=imvns&amp;source=lnms&amp;tbm=isch&amp;ei=iElbT-bZC4HZ0QWp54S9DQ&amp;sa=X&amp;oi=mode_link&amp;ct=mode&amp;cd=2&amp;sqi=2&amp;ved=0CBAQ_AUoAQ&amp;biw=1366&amp;bih=441" rel="noreferrer">first two images shown here</a></p></li>
  </ol>