matplotlib program for pie chart

Python Matplotlib Program for Pie Chart 0

Python Matplotlib Program for Pie Chart

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()