Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #matplotlib #pie #turn #small #pct #labels
ADD COMMENT
Topic
Name
6+7 =