Create a Lollipop Chart with Matplotlib
📖 Scenario: You work in a small bakery and want to show how many lollipops were sold each day last week. You want to create a simple chart to share with your team.
🎯 Goal: Build a lollipop chart using matplotlib to display the number of lollipops sold each day of the week.
📋 What You'll Learn
Create a dictionary with days of the week as keys and lollipop sales as values.
Create a list of days from the dictionary keys.
Create a list of sales from the dictionary values.
Use
matplotlib to plot a lollipop chart with vertical lines and dots.Label the x-axis with days and y-axis with sales.
Display the chart.
💡 Why This Matters
🌍 Real World
Lollipop charts are simple and clear ways to show comparisons between categories, like daily sales or survey results.
💼 Career
Data analysts and scientists use lollipop charts to present data trends clearly to teams and stakeholders.
Progress0 / 4 steps