使用matprolib

时间:2019-09-27 09:39:10

标签: python-3.x pie-chart

我正在尝试使用matprolib绘制饼图。我有一些很小的百分比导致标签重叠,如下所示:

enter image description here

我希望下面是类似的内容,其中百分比较小的标签会从图表中伸出。 enter image description here

我该如何实现?我的代码是这样的: plt.pie(number, labels=labels, colors=colors, autopct='%1.1f%%', shadow=Truw, startangle=140

我不能手动调整它,因为我应该建立一个自动生成大量图像的自动管道。非常感谢。

0 个答案:

没有答案