import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif'] = ['simHei'] #用来正常显示中文标签
labels=['教师','辅导员','实训管理员','行政人员']
sizes=[79,26,20,8]
colors=['yellowgreen','gold','lightskyblue','red']
explode=(0,0.1,0.3,0)
plt.pie(sizes,explode,labels,shadow=(True),startangle=90,autopct='%1.2f%%',\
pctdistance = 0.5,labeldistance = 1.2)
plt.axis('equal')
plt.savefig('../R&Q_pic/test4.jpg',dpi=600) #保存图形图片
plt.show()