Re: [Matplotlib-users] Percentage in pie in e.g. white instead of black

2009-08-22 Thread Werner F. Bruhin
Werner F. Bruhin wrote: I would like to have the percentage values shown in white instead of in black within a pie chart. The following code is doing what I want, but it does not feel right. myPie = axes.pie(values, labels=labels, autopct=u'%1.0f%%', shadow=False, colors=colors)

[Matplotlib-users] Percentage in pie in e.g. white instead of black

2009-08-21 Thread Werner F. Bruhin
I would like to have the percentage values shown in white instead of in black within a pie chart. I figured I could do something like: def reColor(percent): I am lost here on how to format the percentage and change the color axes.pie(values, labels=labels, autopct=reColor,