@Annvil/

Pie Chart for Pets

Python 2.7

No description

fork
loading
Files
  • main.py
  • PieChart.png
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
import matplotlib.pyplot as plt

labels = 'Dogs', 'Cats', 'Fish', 'Birds'
sizes = [12, 7, 8, 3]
colors = ['blue', 'green', 'red', 'yellow']
explode = (0.1,0,0.1,0)

plt.pie(sizes, explode=explode, labels=labels, colors=colors, shadow=True)
plt.title("Students' Favorite Pet")
plt.savefig ("PieChart.png")