Horizontal stacked bar chart in Matplotlib

Since you are using pandas, it’s worth mentioning that you can do stacked bar plots natively:

df2.plot(kind='bar', stacked=True)

See the visualisation section of the docs.

Leave a Comment