course content

Course Content

Visualization in Python with matplotlib

Horizontal Bar ChartHorizontal Bar Chart

Horizontal bar charts are the same as bar charts, but have axes 'swapped': this time bars are horizontal, and values are labeled on the x-axis.

To build horizontal bar chart. use the .barh() function. This function can also be used to build stacked bars, but this time instead of the bottom parameter we should use the left parameter, and instead of width we should use height. For example, we can rebuild the stacked bar chart from example as a horizontal one:

Everything was clear?

Section 2. Chapter 7