0% found this document useful (0 votes)
19 views

Practicle - 6: Aim:-To Create An Exploded Pie Chart

datavisualization

Uploaded by

esha shetty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Practicle - 6: Aim:-To Create An Exploded Pie Chart

datavisualization

Uploaded by

esha shetty
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Name: Esha shetty

Class: SYIT B
ROLL NO: 7107

PRACTICLE-6

Aim:-To create an exploded pie chart

CODE:-

import matplotlib.pyplot as plt


import numpy as np

y = np.array([230,120,130,100,140])

mylabels =['blueberry','Mangoes','Grapes','cherries','apples']

myexplode = [0.1,0.1,0.4,0.1,0.1]

col=['c','m','y','g','r']

plt.pie(y, labels = mylabels,autopct='%1.2f%


%',counterclock=True,startangle=0,shadow=True,colors=col,center=(0,0),rotat
elabels=False,pctdistance=0.6,
wedgeprops = {'linewidth': 8},explode=myexplode)

plt.title('Pecentage of fruits available')


#plt.legend()

plt.show()
Name: Esha shetty
Class: SYIT B
ROLL NO: 7107

OUTPUT:-
Name: Esha shetty
Class: SYIT B
ROLL NO: 7107

CONCLUSION:-

The explode parameter allows you to do that.The explode parameter, if


specified, and not None, must be an array with one value for each wedge.Each
value represents how far from the center each wedge is displayed.

You might also like