title: Horizontal bar chart from right to left in matplotlib
body: <p>The example code provided <a href="https://matplotlib.org/gallery/lines_bars_and_markers/barh.html" rel="noreferrer">here</a> generates this plot:</p>
  
  <p><a href="https://i.stack.imgur.com/3n8Me.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3n8Me.png" alt="enter image description here"></a></p>
  
  <p>I want to know if it is possible to plot the exact same thing but "mirrored", like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Nty5y.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Nty5y.png" alt="enter image description here"></a></p>
  
  <p>Here is the sample code provided just in case the link stops working:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import numpy as np
  
  # Fixing random state for reproducibility
  np.random.seed(19680801)
  
  
  plt.rcdefaults()
  fig, ax = plt.subplots()
  
  # Example data
  people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')
  y_pos = np.arange(len(people))
  performance = 3 + 10 * np.random.rand(len(people))
  error = np.random.rand(len(people))
  
  ax.barh(y_pos, performance, xerr=error, align='center',
          color='green', ecolor='black')
  ax.set_yticks(y_pos)
  ax.set_yticklabels(people)
  ax.invert_yaxis()  # labels read top-to-bottom
  ax.set_xlabel('Performance')
  ax.set_title('How fast do you want to go today?')
  
  plt.show()
  </code></pre>