Why axis formatting matters
📖 Scenario: You are analyzing sales data for a small store. You want to create a simple line chart to show sales over days. Proper axis formatting will help make the chart clear and easy to understand.
🎯 Goal: Build a line chart using matplotlib that shows sales over days with clear axis labels and formatted ticks.
📋 What You'll Learn
Create a list called
days with values 1 to 7 representing days of the weekCreate a list called
sales with exact values: 150, 200, 170, 220, 180, 210, 190Create a
matplotlib line plot using days and salesSet the x-axis label to
'Day of Week'Set the y-axis label to
'Sales ($)'Format the y-axis ticks to show dollar sign and no decimals
Display the plot
💡 Why This Matters
🌍 Real World
Axis formatting helps make charts easy to read and understand in reports and presentations.
💼 Career
Data scientists and analysts use axis formatting to communicate data insights clearly to others.
Progress0 / 4 steps