Answers for "matplotlib pie turn small pct labels off"

0

matplotlib pie turn small pct labels off

def my_autopct(pct):
    return ('%.2f' % pct) if pct > 20 else ''

ax.pie(df[col], labels=df.index, autopct=my_autopct, colors=colors)
Posted by: Guest on April-10-2022

Python Answers by Framework

Browse Popular Code Answers by Language