8000 FIX: callback for subfigure uses parent by jklymak · Pull Request #22806 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

FIX: callback for subfigure uses parent #22806

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 1 commit into from
Apr 9, 2022

Conversation

jklymak
Copy link
Member
@jklymak jklymak commented Apr 8, 2022

PR Summary

Closes #22804

Not clear that SubFigures shouldn't get their own callback - @anntzer and @greglucas better understand how these work or what the right scope should be.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

@anntzer
Copy link
Contributor
anntzer commented Apr 8, 2022

Does this really help #22804 (other than hiding the AttributeError)? I don't think dpi_changed will be correctly called on the subfigure, right?

@jklymak
Copy link
Member Author
jklymak commented Apr 8, 2022

I'm not sure. I thought this just updated the artist if the dpi changes. That can be handled at the parent level I think. However I didn't too carefully trace this through and the original issue wasn't clear on how big the arrow should be etc. Testing on the fly dpi changes is not easy I think.

@jklymak
Copy link
Member Author
jklymak commented Apr 9, 2022

I think this is still OK for #22804, though I prefer you removing the callback for quiver #22807. The only callback we allow is dpi_changed (and it was only used in quiver) so I think its correct to just fallback to the parent figure callback if someone else has used this callback for something.

@jklymak jklymak marked this pull request as ready for review April 9, 2022 07:20
@anntzer
Copy link
Contributor
anntzer commented Apr 9, 2022

Ah, sorry I misread. Yes this looks good (even if we may want to deprecate this later).

@greglucas greglucas merged commit 5937c68 into matplotlib:main Apr 9, 2022
@QuLogic QuLogic modified the milestones: v3.6.0, v3.5.2 Apr 11, 2022
@QuLogic
Copy link
Member
QuLogic commented Apr 11, 2022

@meeseeksdev backport to v3.5.x

@lumberbot-app
Copy link
lumberbot-app bot commented Apr 11, 2022

Could not push to auto-backport-of-pr-22806-on-v3.5.x due to error, aborting.

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Apr 11, 2022
@QuLogic
Copy link
Member
QuLogic commented Apr 12, 2022

@meeseeksdev backport to v3.5.x

@lumberbot-app
Copy link
lumberbot-app bot commented Apr 12, 2022

Could not push to auto-backport-of-pr-22806-on-v3.5.x due to error, aborting.

@QuLogic
Copy link
Member
QuLogic commented Apr 13, 2022

meeseeksdev backport to v3.5.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Apr 13, 2022
oscargus added a commit that referenced this pull request Apr 13, 2022
…806-on-v3.5.x

Backport PR #22806 on branch v3.5.x (FIX: callback for subfigure uses parent)
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.

[Bug]: Quiver not working with subfigure?
4 participants
0