-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPie_chart.txt
More file actions
37 lines (24 loc) · 886 Bytes
/
Copy pathPie_chart.txt
File metadata and controls
37 lines (24 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from matplotlib import pyplot as plt
plt.style.use("fivethirtyeight")
data =[30,20,20,15,10,5]
explode=[0,0,0,0,0.2,0]
labels=["BMW ","DODGE","FORD ","MERCEDES","BORCH","JAGWAR",]
color =["blue","black","red","yellow","green","orange",]
plt.pie(data ,labels=labels ,explode=explode
,colors=color,wedgeprops= {"edgecolor":"black"})
plt.title("CARS")
plt.tight_layout()
plt.show()
############################################"
from matplotlib import pyplot as plt
plt.style.use("fivethirtyeight")
data =[30,20,20,15,10,5]
explode=[0,0,0,0,0.2,0]
labels=["BMW ","DODGE","FORD ","MERCEDES","BORCH","JAGWAR",]
color =["blue","violet","red","yellow","green","orange",]
plt.pie(data ,labels=labels ,explode=explode
,shadow=True,autopct="%1.2f%%",colors=color
,wedgeprops= {"edgecolor":"black"})
plt.title("CARS")
plt.tight_layout()
plt.show()