Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
PRF: only check some artists on mousemove#4878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Instead of walking the full hitlist of the Axes, only check artiststhat ask to be part of the mouseover events.This is still missing logic to remove the artist from the mouseover_setwhen removing the artist from the Axes.
blink1073 commentedAug 7, 2015
What would be wrong with checking |
tacaswell commentedAug 7, 2015
I was trying to avoid walking the artist tree at all and avoid changing hit On the other hand, self.get_children would only do one layer, be only a bit On Fri, Aug 7, 2015, 9:05 AM Steven Silvesternotifications@github.com
|
blink1073 commentedAug 7, 2015
You're right, it makes more sense the way it is now. |
fariza commentedAug 7, 2015
I prefer this approach to using the hitlist, it's cleaner and easier to follow what's being reported. @tacaswell I think this would be a good place to also address#4284 making, a similar property in axes, to report or not. |
tacaswell commentedAug 10, 2015
@fariza Possibly, but by the time we get to this code, the decision about what Axes to hand the event to to process has already been made, although it is probably simple to look up if there are any twin axes here. I am inclined to punt on that to get the mouse-over code shippable ASAP. |
WeatherGod commentedAug 12, 2015
Initially reported over in#4738 , I encountered a very troubling bug with |
tacaswell commentedAug 14, 2015
Also close#4918 |
This is useful when removing artists from an `Axes`
- disconnect the stale_callback (this assumes thatmatplotlib#4738 goes in) - remove the artist from the Axes.mousover_set - marks the parent axes/figure as stale - resets the artist's axes/figure to None
tacaswell commentedAug 14, 2015
@matplotlib/developers I think this is ready to go. |
tacaswell commentedAug 14, 2015
Forgot this last thing from been when i was working on this/writing up the On Wed, Aug 12, 2015, 2:54 PM Benjamin Rootnotifications@github.com
|
tacaswell commentedAug 14, 2015
Been should be Ben. On Fri, Aug 14, 2015, 8:08 AM Thomas Caswelltcaswell@gmail.com wrote:
|
WeatherGod commentedAug 14, 2015
I did a little bit more investigation on this. The data I was displaying On Fri, Aug 14, 2015 at 8:09 AM, Thomas A Caswellnotifications@github.com
|
jenshnielsen commentedAug 14, 2015
The test error on python 2.6 looks real |
tacaswell commentedAug 14, 2015
The failure is due to import errors in test_artist in 2.6, hurray. I really want to just drop 2.6, but I will get this sorted out. |
jenshnielsen commentedAug 14, 2015
Im 👍 on dropping python 2.6 but I guess should keep it round for 1.5 and 2.0. Skipping the tests on Python 2.6 is IMHO an acceptable solution if the import error is in the test. |
OceanWolf commentedAug 14, 2015
Drop 2.6??? Could we do that for 2.x? OrderedDicts here we come! 😄. |
Apparently `assert_is`, `assert_in`, and `assert_not_in` arenot in the 2.6 version of nose, but are in all others.
tacaswell commentedAug 14, 2015
The problem was that some of the fancier assert statements are not in 2.6, but are every where else (despite nose having the same version). I just switched to using |
PRF: only check some artists on mousemove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Just wondering, have you ever measured the performance of descriptor access vs attribute lookup. You might be quite shocked 😱
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I have not, but I made this a property for the setter functionality.
tacaswell commentedAug 27, 2015
@pelson I agree this isn't great, but the Another option I see is to periodically walk the children and cache which of them have a message to add to the mouse over string, but that has a higher chance of going out of sync than this method does. I have no problem renaming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Surely the logic for removing from the axes should live in the remove method itself. Is there a reason we can't do that?
Instead of walking the full hitlist of the Axes, only check artists
that ask to be part of the mouseover events.
This is still missing logic to remove the artist from the mouseover_set
when removing the artist from the Axes.
This is an alternative to#4847
attn@blink1073