Matplotlib Pie Charts
Machine Learning courses with 100+ Real-time projects Start Now!!
Program 1
import matplotlib.pyplot as mat
st_result=["Ist Division","II Division","III Division","Supp","Fail"]
#st_result=["BJP","Congress","AAP","ABCD","XYZ"]
st_value=[750,230,170,190,80]
mat.figure(figsize=(12,10))
mat.pie(st_value,labels=st_result,startangle=0,explode=[0.1,0.1,0.1,0.1,0.1],autopct="%2.1f%%",shadow=True,colors=['green','blue','yellow','white','red'])
mat.legend( loc="upper right")
mat.title("Data Flair Student Result")
mat.show()
Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

