Skip to content

Correctly check inaxes for multicursor - #19636

Merged
timhoffm merged 2 commits into
matplotlib:masterfrom
ianhi:cursor-ax
Mar 13, 2021
Merged

timhoffm merged 2 commits into
matplotlib:masterfrom
ianhi:cursor-ax

Conversation

@ianhi

@ianhi ianhi commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

PR Summary

multicursor now checks if event.inaxes is one of the axes it will draw on.

Fixes: #19635

Before
Peek 2021-03-03 18-59
After:

Peek 2021-03-03 19-28

PR Checklist

There aren't any multicursor tests - does this change need a test?

  • [ NA? ] Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • [NA] New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • [NA] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [NA] API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@QuLogic

QuLogic commented Mar 4, 2021

Copy link
Copy Markdown
Member

There are very few widget tests, so if you want to write one, that'd be great.

@tacaswell tacaswell added this to the v3.5.0 milestone Mar 4, 2021

@dstansby dstansby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot for this! I've commented on what needs to change for the tests to pass. In addition, do you think you'll be able to add a new test to check for the bug that you've fixed? If not, I can have a go at adding one.

Comment thread lib/matplotlib/widgets.py Resolved
@ianhi

ianhi commented Mar 7, 2021

Copy link
Copy Markdown
Contributor Author

do you think you'll be able to add a new test to check for the bug that you've fixed? If not, I can have a go at adding one.

Hi @dstansby thanks for pinging me here. Work got busy, and it suddenty wasn't allllways below freezing so I've been making a concsious effort to be outside instead of on my computer and let this slip - sorry about that! Anyway I added a test which I think covers most what seems relevant for MultiCursor.

@dstansby dstansby left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks a lot!

@timhoffm
timhoffm merged commit 0bc924d into matplotlib:master Mar 13, 2021
@ianhi
ianhi deleted the cursor-ax branch March 14, 2021 01:28
@ianhi ianhi mentioned this pull request May 14, 2021
@ianhi

ianhi commented May 14, 2021

Copy link
Copy Markdown
Contributor Author

Since this is a bugfix could it be re-milestoned to 3.4.x and then caught up in a patch release?

Apparently people are running into this, see #20231

@tacaswell tacaswell modified the milestones: v3.5.0, v3.4.3 May 14, 2021
@tacaswell

Copy link
Copy Markdown
Member

@meeseeksdev backport to v3.4.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 14, 2021
jklymak added a commit that referenced this pull request May 14, 2021
…636-on-v3.4.x

Backport PR #19636 on branch v3.4.x (Correctly check inaxes for multicursor)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multicursor updates to events for any axis

5 participants