我希望我使用 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()
python matplotlib
matplotlib ×1
python ×1