This looks tangentially related to a problem I've just noticed - in axes.py, the pie graph code doesn't assign the label strings it was given to the 'pie segment' Wedge patches it generates.
With the change shown below, it does:
for frac, label, expl in zip(x,labels, explode):
...
w = Wedge((x,y), radius, 360.*theta1, 360.*theta2,
facecolor=colors[i%len(colors)])
slices.append(w)
self.add_patch(w)
--- self.set_label(label)
+++ w.set_label(label)
I noticed this problem while trying to generate a legend, same as Emmanuel - could the scatter plot code have a similar problem? Or am I looking at something completely different?
(Incidentally, I've noticed that the shadow patches generated by the pie code are also included in the legend - this doesn't look like the right behaviour, but I'm still very new to matplotlib, so I'm not sure.)
(The code above is from the python2.3-matplotlib v0.86.2-4 debian package.)
Thanks for the patch, I verified the problem and applied it. You're
right that there's an issue with the shadows patchs getting legend
labels, which isn't as obvious how to fix. Unfortunately, I don't have
time to deal with it right now. Could you file a bug report on
sourceforge so it doesn't get lost?
Cheers!
Andrew
Simon Hildebrandt wrote:
···
This looks tangentially related to a problem I've just noticed - in
axes.py, the pie graph code doesn't assign the label strings it was
given to the 'pie segment' Wedge patches it generates.
With the change shown below, it does:
for frac, label, expl in zip(x,labels, explode):
...
...
w = Wedge((x,y), radius, 360.*theta1, 360.*theta2,
facecolor=colors[i%len(colors)])
slices.append(w)
self.add_patch(w)
--- self.set_label(label)
+++ w.set_label(label)
I noticed this problem while trying to generate a legend, same as
Emmanuel - could the scatter plot code have a similar problem? Or am I
looking at something completely different?
(Incidentally, I've noticed that the shadow patches generated by the
pie code are also included in the legend - this doesn't look like the
right behaviour, but I'm still very new to matplotlib, so I'm not sure.)
(The code above is from the python2.3-matplotlib v0.86.2-4 debian
package.)
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options