Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Fix OffsetBox custom picker#30096

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

Merged
timhoffm merged 1 commit intomatplotlib:mainfromQuLogic:fix-offsetbox-pick
May 24, 2025

Conversation

QuLogic
Copy link
Member

PR summary

As with the custom picker,Artist.contains returns a boolean and a dictionary in a tuple. This non-empty tuple is always true, so the custom picker would always return True for any non-scroll event. It would also lose the related dictionary.

This brokemplcursors tests.

PR checklist

@QuLogicQuLogic added this to thev3.10.4 milestoneMay 22, 2025
@greglucas
Copy link
Contributor

Are you able to bring one of the tests from mplcursors over to get coverage of the new line?

@QuLogic
Copy link
MemberAuthor

Possibly, but they all usemplcursors objects too.

Copy link
Contributor

@anntzeranntzer left a comment

Choose a reason for hiding this comment

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

Looks correct, and definitely fixes mplcursors' test suite. A test would be nice indeed.

Also the logic looks a bit inverted, I'd write this asif mouseevent.name == "scroll_event": return False, {} else: return artist.contains(mouseevent), not that it really matters.

timhoffm reacted with thumbs up emoji
Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

Optionally, take suggestions by@anntzer

As with the custom picker, `Artist.contains` returns a boolean and adictionary in a tuple. This non-empty tuple is always true, so thecustom picker would always return True for any non-scroll event. Itwould also lose the related dictionary.
@timhoffmtimhoffm merged commit948a26f intomatplotlib:mainMay 24, 2025
40 of 41 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMay 24, 2025
@QuLogicQuLogic deleted the fix-offsetbox-pick branchMay 24, 2025 00:18
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.10.4
Development

Successfully merging this pull request may close these issues.

4 participants
@QuLogic@greglucas@anntzer@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp