import matplotlib.pyplot as plt labels='Frogs','Hogs','Dogs','Logs' sizes=[15,30,45,10] explode=(0,0.1,0,0) plt.pie(sizes,explode,labels,autopct='%1.1f%%',shadow=True,startangle=90) plt.axis('equal') plt.savefig('test4',dpi=600) plt.savefig('../PIC/test4',dpi=600) plt.show()
得到如图所示即为成功
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)