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

courses
Image

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *