小编tas*_*eel的帖子

是否有使用 matplotlib 指定饼图中标题的位置?

我不知道如何使用 matplotlib 指定标题的位置。我希望标题离标签远一点,但我不知道如何设置。

labels = df03['new_sentiment']
count = df03['count']

fig1, ax1 = plt.subplots()
ax1.pie(count, labels=labels, autopct='%1.1f%%')
ax1.axis('equal')
plt.title('7D-prior-3MD_sem_sen')
plt.savefig('04_7D-prior-3MD_sem_sen.tiff', dpi=300, format='tiff', bbox_inches='tight')
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

python matplotlib pie-chart

2
推荐指数
1
解决办法
4655
查看次数

标签 统计

matplotlib ×1

pie-chart ×1

python ×1