WORKSHEET
MATPLOT
1)
2)
3)
Also give suitable python statement to save this chart.
4) Write a Python program to display a bar chart of the popularity of programming
Languages
Data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++
Popularity: 22.2, 17.6, 8.8, 8, 7.7, 6.7
Also give suitable python statement to save this chart
5)
6)
Write Python programming to display a bar chart of the popularity of
programming Languages.
Sample data:
Programming languages: Python, Java, PHP, JavaScript
Popularity: 8.6, 8, 7.8, 6.4
7)
Write a python program to plot a line chart based on the given data to depict the
medal tally between four Houses in school.
House=['Shivaji', 'Tagore', 'Raman', 'Ashoka']
Medal_count=[50,60,40,55]
8) Write a Python program to create the histogram for height of 250 people in a
company.
Data:
Height (in cm) No of employees
140 to 145 2
145 to 150 5
150 to 155 15
155 to 160 31
160 to 165 46
165 to 170 53
170 to 175 45
180 to 185 28
185 to 190 21
190 to 195 4
Also give suitable python statement to save this chart.
9) Write a program to plot a histogram using mentioned data set for distance in
kilometres and kilometres count
days = [50,80,70,80,40,20,20,20,70,20,60.20,80,50,40,50,20,60,60,60]
bins = [0,10,20,40,50,60,70,80,90,100]
10) Write a program to create a score card using horizontal bar graph for 4 players
with their points as shown below:
11) Consider the following number buckets, which have labelled range and numbers
stored according to their label. Plot a histogram for the given data set:
12) Write the Python program to create the below Histogram:
13)
The following table shows the marks secured by two students in the term
examinations for the academic session 2021-2022.
Exam Marks secured by Mohit Marks secured by Sudeep
Term1 85 96
Term2 88 99
Term3 89 92
Term4 86 90
Write a Python code to display a bar chart from a dataframe using the above data.
Also consider the following:
i) Display the exams as same as given here on x-axis.
ii) Apply the line colours as – Marks secured by Mohit: Green, Marks secured by
Sudeep: Red
iii) Apply appropriate labels
iv) Apply chart label as - Term Examinations Report
14) Write a Python code to display a line graph from a dataframe given below
SCORE
GAME TEAM1 TEAM2
Cricket 8 9
Basketball 9 7
Table Tennis 5 8
Shuttle Tennis 4 6
15) The heights of 10 students of eighth grade are given below:
Height_cms=[145,141,142,142,143,144,141,140,143,144]
Write suitable Python code to generate a histogram based on the given data,
along with an appropriate chart title and both axis labels.
Also give suitable python statement to save this chart.