Bar charts are the gold standard for comparing quantities across distinct categories. Vertical bars work best for time/date categories, while horizontal bars (`barh`) are ideal when category names are long sentences.
Measuring the heights or lengths of solid pillars standing in a row.
`plt.barh(categories, values)` flips the chart horizontally. Category labels read left-to-right effortlessly.
plt.barh(frameworks, popularity, color='#6366F1')Avoid the top errors and bad plotting practices that trip up new Python developers
Switch from abstract numbers to relatable Cricket, Cinema & Business charts
Write Matplotlib code to solve the objective and see your live plot render
Create a vertical bar chart for `items=['A', 'B', 'C']` and `vals=[15, 30, 25]` with `color='#6366F1'`.
✓ plt.barTest your understanding to unlock the lesson completion badge