Matplotlib pie autotexts颜色更改问题

2024-09-29 23:14:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试修改自动图文集的颜色,即autoct。我得到以下错误:“AxesSubplot”对象不可编辑。 你能帮我一下吗?在

_, _, autotexts = df_spark["Record_count_check"].value_counts() \
                     .sort_index(ascending=False) \
                     .plot(kind='pie', y="Record_count_check", figsize=(10, 10),
                           legend=True, autopct='%1.1f%%', startangle=90,
                           shadow=False,colors=['green','red'])

Tags: 对象false编辑dfvalue颜色checkcount

热门问题