0 ratings0% found this document useful (0 votes) 488 views22 pagesClass 12 IP Ch-2 Data Visualization Using Matplotlib
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
2s eer CB) JHADESWAR,
Data Visualization o~
* Data Visualization is a graphical representation of quantitative
information and data by using visual elements likegraplis, charts, maps,
aoe Nee
etc, ow
© Ithelps us to understand the significanée of datinby summarizing and
presenting a huge amount of data in a simpléjand easy format.
* Data Visualization tools [Link]’ways to understand outliers,
patterns and trends in these data
ad
Using Pyplot of Matplotlib be
In Python, Matplotiit aya yplot is used for Data Visualization.
© It was originally by J.D\,HUntér and is built on Numpy arrays for 2D plots
ofarrays. NAN
\ ‘
‘ Itisa collection. of futictions that make work like MATLAB.
(Created By-SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA Contact-7008443534, 9090042625
JHADESWAR
wkernational School
Stones
How to install matplotlib
Type the following command in the command prompt
pip install matplotlib ‘
Importing the Library
import [Link]
import [Link] as plt AX
Types of Plotting/Visualizati ion,
There are may types of visy lization§,aVailable like:
* Line plot \é
© Scatter Plot
© Histogram
* Box plot
* Bar Chart
«Pie Chart
(Created By- SK ABDUL ISRAR,
PGT (Computer Science) MTech, McA, BCA,
Contact-7008443534, 9090042626CChapter-S Data Visualization laternattonal School
Subject :tnformaties Practices i JHADESWAR
SS
Basic Parts of a Chart
(Created By- SK ABDULISRAR
Contaet-7008443534, 9090042625
PGT (Computer Science) MTech, MCA, BCA
‘Subject : Informatics Practices
‘Chapter-5 Data Visualization
JHADESWAR
taternational School
and a y-label.
# Axis: They are number line like objectSai
graph .lines.
¢ Labels: It used to add names to
« Title: It is used to display the'titl
« xticks: It sets the current tick locations and labels of the X-axis.
© yticks: It sets the current tick locations and labels of the Y-axis.
Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA
6
Contact-7o08443534, 9090082Subject: nformaties Practices Cs}; JHADESWAR
CChapter-5 Data Visualization witernational School
Line Chart/Plot “
Aline chart or line graph can be created using the plot() function available in
pyplot module. Rn
Syntax: 7 .
[Link](x-axis, y-axis, color, linewidth or Iw, linestyle or Is,
marker, markersize, markeredgecolor)s
d=[3,7,4,8]
[Link](d)
pitshow() {8
Note: In the above example list ‘d’ is considered as y-axis of plot.
(created By-SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA Contact-7008443534, 9090042626
rs (By HARESMAR
Chapter-5 Data Visualization QED trternationat Schoot
‘style Style
Abbreviation
Solid
Dashed
Dashdot
Dotted
“Color Character [Color Name
bh WV Blue
‘Vic Cyan
Green
Black
Magenta
Red
White
Yellow
Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA ‘Contact-7008443534, 9090042626Subject: Informatics Practices
CChapter-5 Data Visualization
Ex:-2
JHADESWAR
iternational sehool
import [Link] as plt.
[Link]([3,7,4,8],[10,15,20,25], color='g', linestyle:
[Link](‘Line Graph’)
[Link]('Y-axis')
[Link]('x-axis')
[Link](True)
[Link]()
‘Created By-SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA
Subject: Informatics Practices
Chapter-5 Data Visualizati
‘Contaet-7008443534, 9090042625
JHADESWAR
aternattonal Sence!
Symbol,
triangle’ down)
riangle up
triangleyIeft
tiatigle right
tri. down
tri_up
tri_left
tri_right
‘octagon.
square
pentagon
plus (filled)
star
Thr %
fo |e [+ [e [em (oly Js ]>|< |v Ja > |< le
hexagon
oH #
Created By- SK ABDUL ISRAR
GT (Computer Science) MTech, MCA, BCA
hexagon? 4
Contact-7on844a534, 90900826‘Subject : Informatics Practices.
Chop bat uation AES WAR,
a
x’ x
"x" x (filled),
"Dp" diamond
J thingdiamond?™
vine \<
inline:
OCTICKLEFT) lickleft
1 (TICKRIGHT)
2 (TICKUP)_
3 (TICKDOWN) Fr
4(CARETLEFT) _& “f
5 (CARETRIGHD) A. caretright
6(CARETUP) 2%, fia’ caretup
7(CARETDOWN). caretdown
8 (CARETLEFTBASE)..” caretleft (centered at base)
9 (CARETRIGHTBASE) caretright (centered at base)
10 (CARETUPBASE) caretup (centered at base)
11 (CARETDOWNBASE) caretdown (centered at base)
plus
‘Created By- SK ABDULISRAR
PGT {Computer Science) MTech, MCA, BCA
Subject: informatics Practices JHADESWAR
‘Chapter-5 Data Visualization Wikernational School
Ex:-3 (With Markers)
import [Link] as plt
[Link]({3,7,4,8],[10,15,20,25], marker="*", markersiz
[Link]('Line Graph’)
[Link]('Y-axis')
[Link]('x-axis')
[Link](True)
[Link]()
a
(Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA Contact-7008443534, 9090042626,Subject : Informatics Practices, JHADESWAR
Chapter-5 Data Visualization international School
Ex:-4 (With xticks & yticks)
import [Link] as plt
date=[25,26,28]
temp=[8.5,10.5,6.8]
[Link]{date,temp)
[Link]('Date’) Datewise Temperature
plt,ylabel(‘Temperature’) 3 Hh a
[Link](‘Datewise Temperature’)
[Link](True)
[Link](temp)
[Link](date)
[Link]() |
|
|
|
!
7 q
q
3s 3 =
ate 3
Created By: SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA (Conttact Tones ss=2%, S0mucaress,
‘Subject: Informatics Practices :
ee CB} JHADESWAR
Saving plot to files
We can the figure in two ways:-
a) by clicking the Save button on the GUI panel.
b)by using savefig() method
Ex:
import [Link] as plt
[Link]([3,7,4,8],[10,15,20,25], markers"
[Link]('Line Graph’) aie : sai
[Link](’Y-axis') é
[Link]('x-axis")
[Link](True) p ;
[Link]("[Link]’) %»_
[Link]() » *
euch
Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA,
6
Contact-7008443534, 90900425subject informatie Pracles & JHADESWAR
‘Chapter-5 Data Visualization Wakernatlonal school
Line Chart by using a Pandas Series
We can create Line chart from Pandas Series by using plot(o pandas library.
Ex:
import [Link] as pit
import pandas as pd
pltd=[Link]([10,12,15,30],['a','b’,'c')'d'])"
[Link](kind='line')
[Link](‘Sectionwise Student :
[Link]('Sections') \, ¥ Sects Studer stat
[Link]('Strength')
[Link]()
‘Created By- SK ABDUL ISRAR = i
PGT (Computer Science) MTech, MCA, BCA Contact-7008443534, 9090042626
‘Subject : Informatics Practices JHADESWAR
CChapter-5 Data Visualization D international School
Line Chart by using a Pandas DataFrame
We can create Line chart from Pandas DataFrame by using’ let(Jof pandas library.
Ex:
import [Link] as pit
import pandas as pd
weight=[20.5,21.5,24,6,25.8,27.4,30.2,
df=[Link]({'Height': height, Weigh weight})
[Link](df Weight,df-Height) .»
[Link]('Weight in KG’)
[Link]('Height in CM’) “
[Link](‘Average Height ventas Weight') 5».
[Link]() os, fo
Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA CContact-7008443534, 9090042626‘Subject sInformaties Practices
CChapter-s Data Visualization
Line Chart by using a CSV File
Ex:
a 36.
a
“a
5 40
39,
3s)
40
Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA
Subject : informatics Practices
Chapter-5 Data Visualization
import pandas as pd
import [Link] as pit
df=pd.read_csv('[Link]')
[Link](kind='line’,color=['red','green', "blue!
[Link]('Weather Report’)
[Link]('Days')
[Link](‘Temperature in degree ¢ re
ticks=[Link]()
[Link](ticks,[Link])
[Link]()
‘Created By-SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA
33 Friday
_ 39 Saturday
Contact-7008443534, 9090042625
‘Sey Weilay Teli Wea Tadayfily ST
on
JHADESWAR
Uxternational School
JHADESWAR
D wrternational Seker)
Contact-7onga43sas, sont
4‘Subject : Informatics Practices JHADESWAR
Chapter-S Data Visualization lakernational School
Line Plot with multiple lines
Ex:
import [Link] as pit
x=([1,2,3]
y=15,7,4]
[Link](x,y,label='First Line')
x2=[1,2,3]
y2=[10,11,14] : ew Geaph
[Link](x2,y2,label='Second:Line!)
[Link]('Plot Number’)... :
[Link]('Important Variables!)/)
[Link]('New Graph" ')
[Link]()
[Link]()
nN
ibe ib ile is abe ais abe 2m ame ql
‘Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MICA, BCA Contact-7008443534, 9090042626
‘Subject : Informatics Practices
JHADESWAR
Chapter-5 Data Visualization D international School
Q) Write the code for the following graph which will display the different
style multiline it in same plot
jae > bQeiB
Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA
4]
Contact-7008443534, 9090042626Subject: Informatics Practices
CChapter-5 Data Visualization
import [Link] as pit
.0,20,30)
x2=[10,20,30]
y2=[40,10,30]
[Link](x1,y1,label="l
[Link](x2,y2,labe
[Link]('x-axis')
[Link]'y-axis')
[Link]('Plot with differ
[Link]()
[Link]()
[Link]()
‘Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA
‘Subject: nformaties Practices
Chapter-5 Data Visualization
Multiple plots in a same
Ex:
import [Link] as plt
x=[1,2,3]
y=[5,7,4]
[Link](2,1,1)
[Link](xy)
[Link](‘Item')
[Link]('Value')
[Link](True)
[Link]('First Chart’)
[Link](2,1,2)
[Link](x2,y2)
[Link]('item').
pitylabell Value) =
[Link](True)
[Link]('Second Chart!)
[Link]()
Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA
indow using subplot!
Contact-7008443534, 9090042626
&.
Ne
re
AX
First Chart
yoo 335,
480195200. 225 ako
i 2
0 275 300
Contact-7o0ga4asa4, 909004262subject: Informatles Practices
CChapter-5 Data Visualization JHADESWAR |
Multiple plots in a same window adjusting subplots
Ex: import [Link] as pit
x-[1,2,3]
y=15,7,4) a
[Link](2,1,1) © ist chart
[Link](x,y) Tf
[Link]'item')
[Link]('Value’)
[Link](True) T
[Link]('First Chart’) ee ee
plt.subplots_adjust(hspace=0.5, wspats0,5), ve aoe tis 2h0 2s
12,3) Second Chart
y2=[10,11,14] =
[Link](2,1,2)
[Link](x2,y2)
[Link]('Item')
[Link]('Value’) -
pitgrid(True) 350 1/5 200 235 250
[Link](‘Second Chart’) a
pit-show() :
‘Created By- SK ABDUL ISRAR
PGT {Computer Science) MTech, MCA, BCA CContact-7008443534, 9090042626
‘Subject : Informatics Practices JHADESWAR
CChapter-5 Data Visualization laternational School
Bar Chart/Plot
‘A Bar graph or chartis a graphical display of data using bars‘f different heights.
‘« Pyplot offers two bar functions: :
a) bar() : To create vertical bar graph
b) barh() : To create horizontal bar graph
‘Syntax:
[Link](xsequence, ysequence, width=, cal
Note: ~~
Ex: (Vertical Bar) @
import [Link] as Ib
i i',Mumbai’ Bangalore’, Chennai']
1000000, 3000900;2500000, 1500000) Ju
[Link](cities,population) “>
[Link](‘Cities') .
[Link]('Population’)
[Link]() Sc etieeneeeeeen:
‘Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA Contact-7008443534, 9090042626‘Subject : Informatics Practices R
Chapter-5 Data Visualization tkernational Sehoot
Ex: (Horizontal Bar)
import [Link] as plt
cities=[‘Delhi’,'Mumbai','Bangalore’,'Chennai']
population=[2000000,3000000,2500000,1500000] *
[Link](cities, population)
pltylabel('Cities')
[Link]('Population’)
[Link]()
Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA
‘Subject : Informatics Practices
Chapter-5 Data Visualization
Ex: (With width & color)
import [Link] as plt
cities=['Delhi’, Mumbai','Bangalore', 'Chennai'] ey,
poputation=[2000000,3000000,2500000,1500000] \, SS
[Link](cities, population, width=0,3,color:
[Link]('Cities')
pltylabel('Population’)
[Link]()
JHADESWA!
International Schoc
eum
Created By- SK ABDULISRAR ies
PGT (Computer Science) MTech, MCA, BCA
— a |
6
Contact-7008443534, 909004262
PeasSublet: norma bracts
‘Chapter Data Visualization
Se BS, AHADESWAR,
Ex: (With different widths & colors)
import [Link] as plt
citi 'Delhi’,’Mumbai’,'Bangalore','Chennai')
populatior 2000000,3000000,2500000,1500000)
[Link](cities, population, width=[0.5,0.2,0.4,0,6f) colo
[Link]('Cities') :
plt,ylabel('Population’)
[Link]()
(Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA
Subject : Informatics Practices JHADESWAR
Chapter-S Data Visualization tutermational School
Q) Write the python code for the below graph.
Favourite Type of Movies
import [Link] as pitinimpy ‘as ni
movies=['Comedy’,‘Action’,Romance''Drama','SciFi']
15,6,1,4) Re AD
[Link](len(movies)), 3%,
[Link](pos,types,align='center' ,color='orange')
[Link](pos, movies)",
pit ylabel('People') ‘al
[Link]('Favourite Type of Movies') ql
pitshow() g
Created By- SK ABDULISRAR
contact-7008443534, 9090042626
PGT (Computer Science) MTech, MCA, BCASubject: Informatie Practices
CChapter-5 Data Visuallzation
Q) Write the python code for the below graph.
Programming Language Usage
import [Link] as pltsnimpy sn
langs=['Python', 'C+¥', Java’, 'Pelt!, ‘Scala’, 'Lisp']
performance=[10, 8, 6, 4):2;, as}
Pos=[Link](len(langs)) \
[Link](pos, performance,
pltyticks(pos, fangs)",
[Link]('Usage’)™=
[Link]('Programming Language Usage’)
[Link]()
(Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA
‘Subject : Informatics Practices
Chapter-5 Data Visualization
Multicolumn bar chart
‘center’, color="red")
Q) Write the python code to create a plot as given. below:
JHADESWAR
aternational Sohoot
pae27.
Contact-7008443534, 9090042625
cen
Happines index across cites by gender
»
©.
5
He
70
20
0
ooh
Beling Washington Toyo
go Rho tscow
AEPFQE
Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA,‘Subject: Informatics Practices
Chapter-5 Data Visualization G8; JHADESWAI
import [Link] as plt,numpy as np
\gton’,Tokyo','Moscow'] «”
Aternattonal SehooL
city=['Delhi’,'Beijing’,'Washin
male=[60,40,70,65,85)
female=[30,60,70,55,75]
pos=[Link](len(city))
[Link](pos,male,label="male',widt!
[Link](pos+0.2,female,label="femal
[Link](pos,city)
[Link](‘city') :
[Link](‘Happines Index’)
[Link](‘Happines Indéea
[Link]() ,
[Link](‘[Link]’)
[Link]()
Fer natinnodenanan Contact-7008443534, 9090042626
PGT (Computer Science) MTech, MCA, BCA
‘Subject: Informatics Practices JHADESWAR
CChapter-5 Data Visualization iAkernational School
Q) Write the python code to create a plot as given below:
ted By- SK ABDULISRAR
(Computer Sclence) MTech, MCA, BCA Coripes Jonenasest, agnontae2sChapters Data Visualization
import [Link] as plt,numpy as np
"Team A’,'Team B’,'Team C','Team D’,'Team E']
r1=[35,55,10,90,70]
'12,55,78,45,90]
r3=[15,25,45,25,89]
x=[Link](len(teams))
[Link](x,r1,width=0,2,label='Round 1')
[Link](x+0.2,r2,width=0.2,label='Round 2')
[Link](x+0.4,r3,width=0.2,label="Round 3')
[Link](x,teams) ~~
[Link]("Teams')
[Link]('Scores')
[Link]() .
[Link]('[Link]')
[Link]()
» ©
%
‘Created By- SK ABDUL ISRAR a :
PGT (Computer Science) MTech, MCA, BCA
‘Subject : Informatics Practices
Chapter-5 Data Visualization
Bar Chart by using a Series
E
JHADESWAR
International School
import [Link] as plt
import pandas as pd <>
pitd=[Link]({30,42,35,20],['A','B ts
[Link](kind='bar')
[Link]('Sectionwise Student Strengtiy )
[Link]('Sections')
[Link]'Strength’) ‘ Sectonwise Student strength
[Link]() Ors «.
22
Created By- SK ABDUL ISRAR eae a j
GT (Computer Science) MTech, MCA, BCA
Contact-7o08443534, 9090042626ject : Informatics Practices
Chapter-5 Data Visualization
gar Chart by using a DataFrame GE) MIAPESWAR,
EX:
import [Link] as pit
import pandas as pd
std={'2019':[10,12,15,30],
2020':[16,25,22,30},
2021':[19,22,29,32}})
Seton Sten Stn
pltd=[Link](std,index=[!
[Link]{kind="bar')
[Link]('Sectionwise Studei
[Link]('Sections') °
[Link]('Strength’) ®:
[Link]() ee:
crested By-SK ABDUL ISRAR
Pat|Computer Science) MTech, MCA, BCA CContact-7008443534, 9090042625
JHADESWAR
_ Subject : Informatics Practices
taternattonal School
Chapter-5 Data Visualization
Ex: (With align and stacked attribute)
import [Link] as plt
import pandas as pd
Secret eg
| std=('2019':[10,12,15,30],
__ '2020':[16,25,22,30],
'2021':[19,22,29,32]}
pltd=pd,DataFrame(std,index:
_Pit.xlabel('Sections')
_Pit.ylabel('strength')
Pltshow()
Contact-7008443534, 9090042626By mae
Subject: informatics Practices ASARESW, ‘Se AR
Chapters Data Visualization
Bar Chart by using a CSV File
Ex:
k1_|Woek2 |Wook3 [Day
36] 37|___36| Sunday
3s, 39 40/Monday__
aaa
Baan a Weesday
39,404 \Thursday| (
St gat alee
40,38, —_39/Saturday
]
(Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA Contact-7008443534, 9090042625
Sperone vance {35}, JHADESWAR
import pandas as pd
import [Link] as plt
df=pd.read_csv('[Link]')
[Link](kind='bar',color='red','green','blue! )
[Link]('Weather Report')
[Link]('Days')
[Link]('Temperature in degree c’
ticks=[Link]()
[Link](ticks,[Link]) uJ ae
[Link]() :
i
wa Lary Haectc| |
Created By- SK ABDULISRAR
PGT (Computer Sclence) MTech, MCA, BCA,Subject : informatics Practices
Chapter-5 Data Visualization
JHADESWAR
International School
Histogram Chart
a specifiéd tange’of values (called bins),
* Itis similar to a vertical bar chart, However/ia histogtant, unlike a vertical b;
chart shows no gaps between the bars, keen
* Pyplot offers hist() function to create histog sin chart.
‘Syntax:
[Link](x, bins, weights
‘type,color,orientation)
VY
X
bins attribute: Controls h
weights attributa Iti
histogram. Which allows us
overall histogram.
ed to assign weights to each data point in our
Control the contribution of each data point to the
‘created By- SK ABDUL ISRAR
et {Computer Science) MTech, MCA, BCA
Contact-7008443534, 9050042626
peered & JHADESWAR
Q) The heights of 10 students of eight grade are given below:
Height_cms=[145,141,142,142,143,144,141,140,143;144]
Write suitable python code to generate a histogram basedion the given data, along
with an appropriate title and both axis title labels. Also\give'suitable python
statement to save this chart. & s
Ans:
import [Link] as plt
Height. emsr[145, 101,242,242, 143,144,44140,143,144
[Link](Height_cms) ‘ ht chat tant
[Link]('Height Chart of Students’): . 00:
[Link]('Height in cms')
plt,ylabel('Number of students’) *
__ [Link](‘[Link]é’) 2 § soo
_ Pitshow() \
: Ccontact-7008443534, 9090042626
ala}:
Feriel8+SK ABDUL ISRARJHADESWa,
ternational Sey,
‘Subject : Informatics Practices
Chapter-5 Data Visualization
Ex: (With bins attribute)
import [Link] as plt ‘
std_wt=[19,25,30,35,25,60] a é
[Link](std_wt,bins=[0,10,20,30,40,50,60])° °'.-'
[Link]()
Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA
Contact-7008443534, 9090082625
‘Subject : Informatics Practices
‘Chapter-5 Data Visualization JHADESWAR,
Ex: (With weights attribute)
import [Link] as plt
std_wt=[19,25,30,35,25,60]
pit hist(std_wt,bins=[0,10,20,30,40,50,60),
weights: \10,35,40,6.8)
[Link]() ¢ %
Created By- SK ABDUL ISRAR
PGT (Computer Science) MTech, MCA, BCA‘Chapter-5 Data Visualization D international Senool
Ex: (With Color and histtype attribute)
import [Link] as plt
scores = [55, 62, 77, 85, 90, 93, 58, 79, 88, 95, 60}
wts = [1, 1, 3,2, 1,1, 1,3, 2,2, 1)
bns = [50, 60, 70, 80, 90, 100) t .
plt-hist(scores, bins=bns, weights=wts, color='r'phisttype='step')
[Link]('Scores') y"
[Link]('Weighted Frequency’)
[Link](‘Weighted Histogram with:Cust
[Link]() ~t tara wth custom
Subject: Informatie Practices 3 JHADESWAR
&
‘arated By- SK ABDUL ISRAR
P5T {Computer Science) MTech, MCA, BCA Contact-7008443534, 9030042626
Subject informatics Practices
Saher CS) HAPESWAR,
Q) Write the code to plot the given graph
import [Link] as plt
X=[7,19,25,33,55]
i Plt hist(x,bins=[0,10,20,30,40,50,60],weights=[20,17,45,35,8])
[Link]()
Fan [Link] aneneseseSubject: informatie races JHADESWAR
CChapter-S Data Visualization D wikernational school
Ex: (With histtype and orientation attribute) i
import [Link] as plt 4
b=[10,20,11,21,9] 4
g=[11,23,10,9,6] Be,
pit-hist([b,g], bins=[0,10,20,30),rwidth=0.9,color=[' 'g'|,label=['Boys','Girls'],
histtype="barstacked' orientation="horizontal') ‘
[Link]('Range') .
[Link]('Ratio')
[Link]()
[Link]()
(Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA
Subject : informatics Practices
CChapter-5 Data Visualization
Ex:
import [Link] as pit
b=[10,20,11,21,9]
g=[11,23,10,9,6]
[Link](b,bins=[0,10,20,30}, histtype='step')
plt-hist(g,bins=[0,10,20,30]) :
[Link]()
JHADESWAR
International Sencol
Created By- SK ABDULISRAR
PGT (Computer Science) MTech, MCA, BCA,
Contact-7008443534, 9090042626