How to invert horizontal bar chart upside down?

Hi, I have created a horizontal bar chart using this command -

survey['DevType'].value_counts(normalize=True)[0:20].plot.barh(
    figsize=(17,22),
    color='mediumseagreen',
    fontsize=23)
plt.title('Top 20 Developer Type', fontsize=35)
plt.show()

The figure look like this -

Can anybody tell me how to make it upside down? I want the higher values at the top, not at the bottom.

You may want to sort your data in descending order before building bar chart.

1 Like

Or you can do invert_axis - good to have options!

survey[‘DevType’].value_counts(normalize=True)[0:20].plot.barh(
figsize=(17,22),
color=‘mediumseagreen’,
fontsize=23).invert_yaxis()