pyplot饼图绘制
plt.pie()
1 import matplotlib.pyplot as plt
2
3 labels = 'Frogs','Hogs','Dogs','Logs'
4 size = [15,30,45,10]
5 explode = (0,0.1,0,0)
6
7 plt.pie(size,explode=explode,labels=labels,autopct='%1.1f%%',shadow=False,startangle=90)
8
9 plt.axis('equal')
10 plt.show()