In the following I created a horizontal bar chart. However, the lowest proportion is on the top. I am new to Pandas and Matplotlib so I hope you can show me an easy way to put the largest proportion on the top.
plt.style.use('fivethirtyeight')
total = 9674
langs = ['Computer science, computer engineering, or software engineering',
'Another engineering discipline (such as civil, electrical, mechanical, etc.)',
'Information systems, information technology, or system administration',
'A natural science (such as biology, chemistry, physics, etc.)',
'Mathematics or statistics',
'A humanities discipline (such as literature, history, philosophy, etc.)',
'A social science (such as anthropology, psychology, political science, etc.)',
'A business discipline (such as accounting, finance, marketing, etc.)',
'Fine arts or performing arts (such as graphic design, music, studio art, etc.)',
'Web development or web design',
'I never declared a major',
'A health science (such as nursing, pharmacy, radiology, etc.)']
fig, ax = plt.subplots()
langs_users_num = np.array([5387, 764, 687, 528, 420, 407, 392, 385, 327, 212, 128, 37])
percent = langs_users_num/total*100
new_labels = [i+' {:.2f}%'.format(j) for i, j in zip(langs, percent)]
plt.barh(langs, langs_users_num, color='lightskyblue', edgecolor='blue')
plt.yticks(range(len(langs)), new_labels)
plt.tight_layout()
for spine in ax.spines.values():
spine.set_visible(False)
figure(num=None, figsize=(20, 20), dpi=100, facecolor='w', edgecolor='k')
ax.axes.get_xaxis().set_visible(False)
ax.tick_params(axis="y", left=False)
plt.show()
#plt.tight_layout()