0% found this document useful (0 votes)
0 views7 pages

Matplotlib 12th IP

The document discusses various plotting techniques using the Matplotlib library in Python, including line charts, bar charts, and histograms. It provides examples of how to create these plots, customize labels, and display data visually. Additionally, it emphasizes the importance of data visualization in understanding and interpreting data effectively.

Uploaded by

suryanshk802
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)
0 views7 pages

Matplotlib 12th IP

The document discusses various plotting techniques using the Matplotlib library in Python, including line charts, bar charts, and histograms. It provides examples of how to create these plots, customize labels, and display data visually. Additionally, it emphasizes the importance of data visualization in understanding and interpreting data effectively.

Uploaded by

suryanshk802
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
You are on page 1/ 7

PMatptotlb Dala

Pyplet Pytlot bay


30

aesand
tnien þguidu ualsalion
e is
caa a
2D
th
makes weualualon can
Tite slali be
idniyeng
wndlntand uwiang
soma-machine dene Dala
wa miual
and þattuns Viealiualion
nliyau Matblotlib
Seabon
thathelb inand
aulomaaly Comhix mni
gephical
,xelalionahi
b þuBblum ke
e Usong
he nupuulaion
chas weual
plsttng
cHated anol nd
Slss fplot
pltahow C) pt flt eulls e
b libany ab,
xlabel plot to wlan
plot
(«, achae
a
in mapi
( n
Text") H enu the
matblotlib data fatt eti
cole, chaxt romalien
desid hy It
eth) alio
hulhs
It
plet..Each meanshat t w
datanad
to
show) plt
Gabh) ('New
vuable') ('Important glabelite peþett
nmbe Plat nunb) (Plot xlabel þlt
3 2 Label
duna'Second slot(«2,y2, hut
Importnt
vuasle
[,2,3]
Dne Secord
eft i4
Nw
ugnda
lgends and itla pute with along lins io draw
pltshw()
(,41) (C,23], plot pet
bypeot. matplatlb ainbot
3 2
5
chaet line duawa oWAP
Plot unn chat n dyount ms

t nþ aHang (0:0, 20:0, 1)


s[,2,3,4,5,6,7, 8,9, lo, !I,l2, 13,14, 15, I4, 17, 18, 19, 20]
s2=4,5, 6,1,8,9,10,11, 12,13,14, 15, 16, n, 18, 19,20,21,22, 23]
fet chant
plt: utbst (2,,1)
þlt yabel (' value ) Value

Sund Chat
wabaa =Q"4)
Eusblot ( 2, , 2)
t : lot(E, s2) V

pltabel ('Vaku )
þit. ite(Inln Seconal Chaut')
putgud (Tue)
þet shewC)
Prgam to t a sine wave ing liechant.
o75

met matplotlis byblst as plt D50


025

umper nuny n -0-25


-0 50
n arangel-2,!, 0-ot) -0-75

to plot an
algebaie expeien iloxt14 uing line chant
ampet matplslub byßlet a pll

an

petgabel ai
pet- plot (x
mllpe Linu unth
duaw mullisle wh colo
gen expliity
4
3'5
b- ble
n 25
c- yan
naxangell,3) 2

k- black
'm')
magenta
wfia
WAP enhibit
echbt
dieunt liru ayles 8geliow

n doshad li
e(,3) dauh dst ine
t!,. ':) dstled ine
bet hew)

Bax Chat -
Abar chat mpauni aigpcal dal with Jectangulae bas
WAP o þlet a bar hot
import matplcllib- byplot as pl
4= 20,5o,30]
color='oange)
*y wdth - o-5, O5
þltahbw()

wAP to þlet a bas chant hogonaly


Linpet numby a np
import mathlotib pot
'Pel',SP','Matlab')
obyecli =('Bthon', 'Ctr', 'Jaa,
arange len (obieca)
A-þos=nnp axange(
puy =Llo,8,6,42,J
agn ='cent, csloy =')
blt.

blt. hsw)

9WAP o plot the clemni to lisi ueing a ba chat.


mattsotiib. yplet plt- ba (x,9abl &l")
Bau Gueph ush mulll ite plt: bar x2,y2, labl ='Bau2")
H[6,7,8,2, 4] bet"elabell'e')
2LI,5,7, 9]
82,8,2,4,2] þlt ite (Bas Guash m with multlin St)
bt hw( )
WAP lo5 plet a bax hat showng
impert numy a nþ

otyecta (Cemady', 'Alion','Romane','Drama', ifi') 3

(4,5,!, 4)
þet. bau (pes, tytbes, align ='centiw, coler =bue)
elicks

pet.shwc)

Hiatigam
Hiatognam chanti
ha ae
bas They show
the dataset nlo each
inal caled bin

lWAP opist o simle hisloguam o random ralues


inpent matpislib byoist a set 200

imsent nuuny n
andn (loo0)
150
toc

4= npHandorn"
bet shgwc

You might also like