0% found this document useful (0 votes)
3 views6 pages

Weather and Student Data Visualization

The document outlines various data visualization techniques using Python's matplotlib library, including line charts for weather reports, bar charts for student strength analysis, horizontal bar charts for marks in subjects, and histograms for mark distribution. Each section includes a brief aim, the corresponding program code, and the expected output format. The visualizations are designed to effectively present data in a clear and informative manner.

Uploaded by

skovammaladwaith
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

Weather and Student Data Visualization

The document outlines various data visualization techniques using Python's matplotlib library, including line charts for weather reports, bar charts for student strength analysis, horizontal bar charts for marks in subjects, and histograms for mark distribution. Each section includes a brief aim, the corresponding program code, and the expected output format. The visualizations are designed to effectively present data in a clear and informative manner.

Uploaded by

skovammaladwaith
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

17.

Line Chart

AIM: Visualize weather report for three consecutive weeks through


Line plot using the given dataset
week1 week2 week3
0 36 35 32
1 38 36 30
2 42 34 34
3 40 33 35
4 44 32 31
5 36 33 36
6 32 30 31

It should display the following features:


1. Chart title as “weather report”
2. X axis label as “Days”
3. Y axis label as “Temperature in degree celsius

PROGRAM
import pandas as pd
import [Link] as plt
data={'week1':[36,38,42,40,44,36,32],'week2':[35,36,34,33,32,33,30]
,'week3':[32,30,34,35,31,36,31]}
temp=[Link](data)
print(temp)
[Link](kind='line',color=['red','blue','green'])
[Link]('WEATHER REPORT')
[Link]('DAYS')
[Link]("Temperature in degree Celsius")
[Link]()
OUTPUT
week1 week2 week3
0 36 35 32
1 38 36 30
2 42 34 34
3 40 33 35
4 44 32 31
5 36 33 36
6 32 30 31
18. BAR CHART
Aim:
Plot a bar chart for student strength analysis for three
consecutive years comparing and visualizing them by converting
as a Pandas dataframe and plotiing using multiple bars.
PROGRAM
import pandas as pd
import [Link] as plt
strength={'2023':[35,38,34,39],'2024':[32,39,40,31],'2025':[30,4
5,40,34]}
data=[Link](strength,index=['A','B','C','D'])
print(data)
[Link](kind='bar')
[Link]("Students Strength Analysis")
[Link]("SECTIONS")
[Link]("STRENGTH")
[Link](loc="upper left")
[Link]()

OUTPUT
2023 2024 2025
A 35 32 30
B 38 39 45
C 34 40 40
D 39 31 34
19) HORIZONTAL BAR CHART
Aim: To create a horizontal bar chart for the marks obtained in 5
subjects of a student
PROGRAM
import [Link] as plt
subjects = ["Maths", "Physics", "Chemistry", "English", "IP"]
marks = [88, 75, 92, 85, 95]
[Link](subjects, marks, label="Marks Scored",color='green')
[Link]("Marks")
[Link]("Subjects")
[Link]("Students' Marks in Different Subjects")
[Link]()
[Link]()
OUTPUT
20) HISTOGRAM
Aim: Create a histogram of mark distribution
PROGRAM
import [Link] as plt
marks = [45, 56, 67, 70, 75, 80, 82, 85, 90, 92, 95, 98]
[Link](marks, bins=5, edgecolor='black')
[Link]("Marks Range")
[Link]("Number of Students")
[Link]("Distribution of Marks")
[Link]()

OUTPUT

You might also like