首页 > 解决方案 > 如何从饼图中剪切标签并用python将其放入图例中

问题描述

我想剪下馅饼的标签并将它们放入图例中。

dict={'a':45, 'b': 123, 'c':2, 'd':1755, 'e':13}
ser = pd.Series(dict)
print(ser)
ser.plot(kind='pie', shadow=True, autopct='%1.2f%%', pctdistance=1.2)
plt.show()

标签: python-3.xlabellegendseriespie-chart

解决方案


推荐阅读