0% found this document useful (0 votes)
12 views

Matplotlib Cropped

Uploaded by

rg6307550360
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Matplotlib Cropped

Uploaded by

rg6307550360
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Part 2 Data Visualization

1. Given the following data of rainfall in different zones of India in mm


for 12 months, Create multiple lines chart in a figure to observe
any trends from Jan to Dec.
Zones|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec
North|14 | 13 | 13 | 19 | 16 | 20 | 15 | 17 | 19 | 17|15 | 12|
South| 16 | 20 | 13 | 20 | 20 | 17 | 11 |16 | 13 |14 | 17| 20|

CODE:

OUPUT:
2. Write a program to plot a histogram of ages of 80 participants in
some game from given data with 6 bins of your choice.
Data = [ 9,10,11,13,13,15,16,17,18,19,21,23,23,23,24,24,25, 25,25,
25,25,26, 26,27,27,27,27,29,30,30,30,30,31,33,34,34,35, 36,36,37,
37,37,38,39,40,40, 40,41,42,43,43,39,30,31,32,33,34,35,36,37,
38,39,36,37,38,40,41,42,43, 44,45, 50,51,52,53,54,55,56,57,58]

CODE:

OUTPUT:
3. Consider the following data of a medical store and plot the data on
the bar chart and Customize the chart as you wish:
Month Masks Sanitizer Hand wash
March 1500 4400 6500
April 3500 4500 5000
May 6500 5500 5800
June 6700 6000 6300
July 6000 5600 6200
CODE:

OUTPUT:
4. Write a program in Python Pandas to create the following DataFrame
“df” from a Dictionary. Draw line charts to show the plotting of
score1 and score 2 for all batsman. Change font size of the titles to
15 and color to green.

B_No Name Score1 Score2


1 M.S. Dhoni 95 80
2 Virat Kohli 85 92
3 Sachin 110 75
4 Kartik 75 80

CODE:

OUTPUT:
5. Create a histogram of 5 equal bins from the following score of a
test given to students out of 50 marks.
Test-scores 20, 25, 30, 45, 30, 42, 32, 34, 42, 35, 44, 24, 25, 48, 50, 39,
38, 50, 27, 49, 22, 24, 26, 27, 30, 38, 34, 40, 35, 47, 41, 44, 49, 45, 48,
44

CODE:

OUPUT:
6. Consider the data given below. Create a bar chart depicting the
downloads of the app.

App Name App Price in Rs. Total Downloads


Angry Bird 75 197000
Teen Titan 120 209000
Marvel Comics 190 414000
ColorMe 245 196000
Fun Run 550 272000
Crazy Taxi 55 311000

CODE:

OUTPUT:

You might also like