Plotting multiple lines
📖 Scenario: You work as a data analyst for a small company that tracks sales of three products over four months. You want to visualize how sales changed over time for each product.
🎯 Goal: Create a line plot with matplotlib that shows sales trends for three products over four months. Each product's sales should be a separate line on the same graph.
📋 What You'll Learn
Use
matplotlib.pyplot to create the plotPlot three lines, one for each product's sales
Label the x-axis with the months
Add a legend to identify each product's line
💡 Why This Matters
🌍 Real World
Visualizing sales trends helps businesses understand which products are performing well over time and make better decisions.
💼 Career
Data analysts and data scientists often create line plots to compare multiple data series and communicate insights clearly.
Progress0 / 4 steps