Data Science Lab-3
• Course: Data Science Lab
• Topic: Matplotlib Visualization
• Level: Beginner
Lab Learning Outcomes
• • Plot different graphs
• • Use labels, titles & legends
• • Understand graph usage
• • Visualize real-life data
Revision: Basic Commands
• [Link]() → x-axis label
• [Link]() → y-axis label
• [Link]() → graph title
• [Link]() → display graph
Bar Chart Introduction
• Used for categorical data
• Example: Student marks, subjects
Bar Chart Code
• [Link](subjects, marks)
• [Link]('Subjects')
• [Link]('Marks')
• [Link]('Marks Comparison')
• [Link]()
Line Plot Introduction
• Used to show change over time
• Example: Temperature vs Days
Line Plot Code
• [Link](days, temperature)
• [Link]('Days')
• [Link]('Temperature')
• [Link]('Temperature Trend')
• [Link]()
Multiple Lines & Legend
• Used for comparison
• legend() shows data labels
Histogram Recap
• Used for numerical data distribution
• Shows frequency
Histogram Code
• [Link](marks)
• [Link]('Marks')
• [Link]('Frequency')
• [Link]('Marks Distribution')
• [Link]()
Mini Project Activity
• • Choose dataset
• • Create two graphs
• • Add labels & title
Viva Questions
• • Bar vs Histogram?
• • When to use line plot?
• • Why visualization is important?
Next Lab
• Scatter Plot
• Real dataset using Pandas