Vertical Bar chart using rotation='vertical' not working
<p>From the matplot lib example <a href="http://matplotlib.org/examples/lines_bars_and_markers/barh_demo.html" rel="nofollow">lines_bars_and_markers</a>
using <code>rotation='vertical'</code> does not make it vertical. What am I doing wrong?</p>

<pre><code>"""
Simple demo of a horizontal bar chart.
"""
import matplotlib.pyplot as plt
plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt


# 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))

plt.barh(y_pos, performance, xerr=error, align='center', alpha=0.4)
plt.yticks(y_pos, people)
plt.xlabel('Performance')
plt.title('How fast do you want to go today?')

plt.show()
rotation='vertical'
</code></pre>

<p><code>barh</code> is for horizontal bar charts, change to <code>bar</code> and then swap around the data for the axes. You can't simply write <code>rotation='vertical'</code> because that isn't telling the <code>matplotlib</code> library anything, it's just creating a string that is never used. </p>

<pre><code>import matplotlib.pyplot as plt
plt.rcdefaults()
import numpy as np
import matplotlib.pyplot as plt


# Example data
people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')
x_pos = np.arange(len(people))
performance = 3 + 10 * np.random.rand(len(people))
error = np.random.rand(len(people))

plt.bar(x_pos, performance, yerr=error, align='center', alpha=0.4)
plt.xticks(x_pos, people)
plt.ylabel('Performance')
plt.title('How fast do you want to go today?')

plt.show()
</code></pre>

python numpy matplotlib