Skip to content
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

FIX: _trigger_patch_reclip takes axes instance #2441

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

rcomer
Copy link
Member

@rcomer rcomer commented Sep 24, 2024

Rationale

According to the Axes documentation, the callbacks attached to an axes "will be called with func(ax) where ax is the Axes instance." So changed the _trigger_patch_reclip function to expect the axes rather than the event. This fix was prompted by this StackOverflow question and the new test adapted from that. Note that the axes property of a normal axes is itself, but the axes property of an inset axes is its parent. Unfortunately the test coverage of this callback is minimal: when I removed it completely, the only test failure I got was here, where labels became an empty list.

Implications

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Seems right to me.

@dopplershift dopplershift merged commit 694efcf into SciTools:main Sep 25, 2024
29 checks passed
@rcomer rcomer added this to the Next Release milestone Sep 25, 2024
@rcomer rcomer deleted the spines-callback branch September 25, 2024 19:46
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.

3 participants