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()
Did you like this article? If Yes, please give DataFlair 5 Stars on Google

