Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding the artist data on mouse move event message #7102

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 15, 2016

Conversation

fariza
Copy link
Member

@fariza fariza commented Sep 13, 2016

In the tools we didn't add the artist data to the message on mouse move event.

Also added a small check, for get_visible artist list, this is because if the artist is not visible we shouldn't show its data

@tacaswell tacaswell added this to the 2.0.1 (next bug fix release) milestone Sep 13, 2016
if a.contains(event) and a.get_visible()]

if artists:
a = max(enumerate(artists), key=lambda x: x[1].zorder)[1]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is not a = max(artists, key=lambda x: x.zorder) is the same as this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is that it is but to be honest, I didn't check, I just copy/paste from backend_bases.py

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tacaswell as you are the original author of that line, do you see a problem with @Kojoley suggestion?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at this earlier today and have a memory of doing it this way intentionally, but no longer remember the why.

The discussion at https://github.com/matplotlib/matplotlib/pull/4813/files is not enlightening and I can not even claim I just carried through some older code.

I think making that change is fine.

@fariza
Copy link
Member Author

fariza commented Sep 13, 2016

The failures are not related

@fariza
Copy link
Member Author

fariza commented Sep 14, 2016

@Kojoley I simplified as suggested. It works fine on my side

@tacaswell tacaswell merged commit 6f1c68e into matplotlib:master Sep 15, 2016
tacaswell added a commit that referenced this pull request Sep 15, 2016
ENH: Adding the artist data on mouse move event message
@tacaswell
Copy link
Member

backported to v2.x as f52af63

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.