Vertical and Horizontal Bar Charts
Bar charts are essential for comparing values across categories. Let's master both vertical and horizontal bar charts.
Basic Vertical Bar Chart
Horizontal Bar Chart
Better for long category names or many categories:
Customizing Bar Colors
Use different colors to highlight specific bars:
Bar Width and Spacing
Control the appearance of your bars:
Sorted Bar Charts
Sort bars for easier comparison:
Negative Values
Handle bars that go both directions:
Waterfall Charts
Show cumulative effect of values:
Practice: Create a Performance Bar Chart
Key Takeaways
- Use
bar()for vertical bars andbarh()for horizontal bars - Horizontal bars work better for long category names
- Control bar width with the
widthparameter - Add value labels using
ax.text()positioned relative to bars - Use color to encode additional information (performance levels, positive/negative)
- Sort bars for easier comparison of values
- Reference lines (
axhline,axvline) provide context
In the next lesson, we'll explore grouped and stacked bar charts for comparing multiple series.
Up next · Lesson 12 of 38
Grouped and Stacked Bar Charts
1 min read
11 of 38 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

