Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Creating a donut plot python

import matplotlib.pyplot as plt
import numpy as np
colors = sns.color_palette('pastel')
plt.pie(data, labels = label_column, colors=colors)
circle = plt.Circle( (0,0), 0.7, color='white') #removing the center part of the pie graph
p=plt.gcf() #get coded figure (line 3 and 4)
p.gca().add_artist(circle)  #grab line 5
plt.show()
Source by www.analyticsvidhya.com #
 
PREVIOUS NEXT
Tagged: #Creating #donut #plot #python
ADD COMMENT
Topic
Name
5+7 =