3.8 Pie Chart
1. Basic Pie Chart
plt.figure(1,figsize = (6,6))
labels = ['Apple', 'Banana', 'Orange', 'Kiwi']
sizes = [38.4, 40.6, 20.7, 10.3]
colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
patches, texts = plt.pie(sizes, colors=colors, shadow=True, startangle=90)
plt.legend(patches, labels, loc="best")
plt.axis('equal')
plt.tight_layout()
plt.show()
2. Fancy Pie Chart

3. Donut Chart

Last updated