我正在使用以下代码绘制饼图:
fig1, ax1 = plt.subplots(figsize=(8,12))
ax1.pie(data,
labels=label,
radius=1,
startangle=90,
colors=cols,
counterclock=False,
shadow=False,
wedgeprops={'edgecolor': 'white', 'linewidth': 1},
textprops={'fontsize': 8},
pctdistance=0.85,
autopct='%1.1f%%')
plt.title('Title', fontsize=16)
plt.tight_layout()
当我在 textprops 中更改字体大小时,标签的字体大小和百分比都会发生变化。
我想做的是为标签和百分比使用不同的字体大小。