Python Matplotlib Program for Pie Chart

Machine Learning courses with 100+ Real-time projects Start Now!!

Program 1

import matplotlib.pyplot as mat
st_result=["I Divsion","II Divsion","III Divsion","Supp","Fail"]
st_values=[250,170,50,40,24]
mat.figure(figsize=(8,11))
mat.pie(st_values,labels=st_result,startangle=0,explode=[0.2,0.1,0.1,0.1,0.1],colors=['red','green','blue','yellow','black'],shadow=True,autopct="%2.1f%%")
mat.legend()
mat.title("Student Result")
mat.show()

 

We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

courses

TechVidvan Team

TechVidvan Team provides high-quality content & courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.

Leave a Reply

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