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()

 

posted @ 2017-08-08 17:28  心有琳系  Views(332)  Comments(0Edit  收藏  举报