From: Werner F. Bruhin <werner.bruhin@fr...> - 2009-08-21 11:02:38
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:
"I am lost here on how to format the percentage and change
axes.pie(values, labels=labels, autopct=reColor, shadow=False,
I thought I could use a mpl.text.Text but I only get the percentage in
Looked at the gallery and tried to based it on the "barchart_demo2.py"
example without success. Although would prefer not to have to loop
through the text.Text instances and figure out which ones are a
percentage and then color them - but I guess that would be one way of
doing it but it looks a bit odd to me.
Thanks for any tips
From: Werner F. Bruhin <werner.bruhin@fr...> - 2009-08-22 11:09:25
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%%',
for x in myPie:
Is there really no "cleaner" way of doing this?
Get latest updates about Open Source Projects, Conferences and News.