Closed bruno2git closed 8 years ago
Thanks for the very clear bug report, @bruno2git!
At first glance, it looks like it's due to some workarounds I added for the way rectangles added with plt.bar
behave. I didn't think through what happens when they're added directly with Rectangle
.
I think it should be an easy fix, but it may be a bit before I'm able to find time to do it. Things are a bit hectic at the moment, but I'll try to get to it soon.
Thanks again!
Thank you for the attention this issue may deserve of you, @joferkington! Best regards, Bruno
Hi, Joe Kington, Thank you so much for creating this very useful tool! It has helped me a lot!
About the issue, I have used
mpldatacursor
to add annotation boxes toRectangle
artists with their labels. Since I uppdatedmpldatacursor
to version 0.6. all annotations returnNone
. A very simple exemple:In an environment with
mpldatacursor
version 0.5 it shows the labels. With version 0.6.0 or 0.6.1 it returnsNone
. (Note that the circle label appears in both versions.)If in _pickinfo.py, in
rectangle_props
(line 287) you raise the AttributeError, it printsAttributeError: 'Rectangle' object has no attribute '_mpldatacursor_label'
These are probably hacks but, If you replace
label = artist._mpldatacursor_label
withlabel = artist.get_label()
(line 285) it works again. This is also true if you remove (comment out) the Rectangle from the registry (datacursor.py, line 306, inevent_info
)#Rectangle : [pick_info.rectangle_props]
.Regards, Bruno