Pie Chart : import matplotlib.pyplot as plt a= ["apple","banana","mango"] b = [30,10,80] fig = plt.figure(figsize=(10,5)) plt.pie( b,labels=a, autopct = "%1.1f%%", shadow=True, startangle = 90 ) plt. show() Customizing Pie Chart : import matplotlib.pyplot as plt a= ["apple","banana","mango"] b = [30,10,80] fig = plt.figure(figsize=(10,5)) plt.pie(b,labels=a,autopct = "%1.1f%%" , shadow=True, startangle = 90, explode= (0.1,0.1,0) ) plt. show() Pie Chart Without Shadow : import matplotlib.pyplot as plt a= ["apple","banana","mango"] b = [30,10,80] fig = plt.figure(figsize=(10,5)) plt.pie(b,labels=a,autopct = "%1.1f%%", shadow= False , startangle = 90, explode= (0.1,0.1,0)) plt. show() Donut Plot : import matplotlib.pyplot as plt name= ["kanchan" ,"kariahma","kajal",] marks = [80,85,90] center=[10] fig ...
Comments
Post a Comment
If you have any doubts, please let me know