小编jd5*_*d55的帖子

如何使用 matplotlibs 在饼图上显示实际值而不是百分比

我希望我使用 matplotlib 创建的饼图显示实际值而不仅仅是百分比。这是我的代码:

pie_shares= [i for i in mean.values()]
positions = [i for i in mean.keys()]
plt.pie(pie_shares,labels=positions, autopct='%1.1f%%', )
plt.show()
Run Code Online (Sandbox Code Playgroud)

python matplotlib

4
推荐指数
1
解决办法
5858
查看次数

标签 统计

matplotlib ×1

python ×1