饼图 plt.pie
x=[0.1,0.6,0.2]
plt.pie(x)
饼图分离
x = [1,5,2]
plt.pie(x,labels = ["a","b","c"],explode=[0.2,0,0.6])
再加旋转
x = [1,5,2]
plt.pie(x,labels = ["a","b","c"],explode=[0.2,0,0.6],startangle=140)
加标签
x = [1,5,2]
plt.pie(x,labels = ["a","b","c"],shadow=True)
x = [1,5,2]
plt.pie(x,labels = ["a","b","c"],shadow=True,labeldistance = 0.8) #到圆心的距离
x = [1,5,2]
plt.pie(x,labels = ["a","b","c"],shadow=True,labeldistance = 1.2,autopct='%1.1f%%',pctdistance = 0.4) #做一个转义
加坐标等
x = [1,5,2]
plt.pie(x,labels = ["a","b","c"],frame = True)
plt.xlim(-1,1)
plt.ylim(-1,1)
plt.grid()
标签颜色以及显示图例
x = [1,5,2]
plt.pie(x,labels = ["a","b","c"],textprops={
'fontsize'