8000 Fix: have apply_aspect keep track of user-set limits by rcomer · Pull Request #30265 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix: have apply_aspect keep track of user-set limits #30265

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rcomer
Copy link
Member
@rcomer rcomer commented Jul 5, 2025

PR summary

Possibly closes #30230, though I'm unsure if it's a bit too hacky.

Introduce new private attributes so that apply_aspect can keep track of the previously set x/y-bounds. These attributes get reset when set_xlim/set_ylim are called, so further user updates to the limits are respected.

I ran the code from #30230 (comment) and messed about with the window shape. Everything seems fine.

If this seems good to others, I will add a test.

PR checklist

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.

[BUG]: Neither explicit data limit is respected when constrained_layout is used together with set_aspect(..., "datalim")
1 participant
0