Donut Chart Variation
📖 Scenario: You work at a bakery that sells different types of donuts. You want to show which donut flavors are most popular using a donut chart. This chart will help your team understand customer preferences visually.
🎯 Goal: Create a donut chart using matplotlib to display the sales distribution of donut flavors. You will start by setting up the sales data, then configure the chart style, create the donut chart, and finally display it.
📋 What You'll Learn
Use a dictionary called
donut_sales with exact keys and values for donut flavors and their sales.Create a variable called
colors to hold a list of colors for the chart slices.Use
matplotlib.pyplot.pie to create a pie chart with a hole in the center to make it a donut chart.Display the donut chart with labels and a legend.
💡 Why This Matters
🌍 Real World
Donut charts are useful to show parts of a whole in sales, survey results, or any category distribution in a visually appealing way.
💼 Career
Data analysts and scientists often use donut charts to communicate insights clearly to non-technical stakeholders.
Progress0 / 4 steps