Pie and Donut Charts
Pie and Donut Charts
Pie charts show how parts contribute to a whole. While often overused, they can be effective for simple comparisons with few categories.
Basic Pie Chart
Loading Python Playground...
Exploded Pie Chart
Emphasize specific segments:
Loading Python Playground...
Donut Chart
A pie chart with a hole in the center:
Loading Python Playground...
Nested Donut Chart
Show hierarchical data:
Loading Python Playground...
When NOT to Use Pie Charts
Loading Python Playground...
Pie Chart Best Practices
Loading Python Playground...
Practice: Create a Budget Donut Chart
Loading Python Exercise...
Key Takeaways
- Pie charts show part-to-whole relationships
- Best used with 3-5 categories with clear size differences
- Use
explodeto emphasize specific slices - Create donuts with
wedgeprops=dict(width=value) - Add center text in donuts for key metrics
- Consider bar charts for precise comparisons or many categories
- Always start from 12 o'clock (
startangle=90) for easier reading
In the next lesson, we'll explore creating subplots to combine multiple charts.

