| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| assert ratio1 == ratio2 | ||
|
|
||
|
|
||
| def test_savefig_preserve_layout_engine(tmp_path): |
There was a problem hiding this comment.
This worked before didn't it? It was when the rcParam was set that the problem was? Or was the layout still getting set to None, and then falling back to the rcParam?
Otherwise if this works, I'm all for it! I do wish all the context switching were simpler to debug, but...
Sorry, something went wrong.
There was a problem hiding this comment.
On main this test throws an AttributeError because the layout engine got set to None. If we set the rcParam then we would get an assertion error on main. I'm happy to test either or both.
Sorry, something went wrong.
|
Thanks for tracking this down @rcomer ! Great detective work.... |
Sorry, something went wrong.
Sorry, something went wrong.
…971-on-v3.7.x Backport PR #24971 on branch v3.7.x (FIX: adjust_bbox should not modify layout engine)
| Back | FazBrowse Home | New Git URL |
PR Summary
Fixes #24954 (I think!) I don't claim to fully understand everything that's going on here, but it seems to me that these lines are doing the same job as
matplotlib/lib/matplotlib/backend_bases.py
Lines 2356 to 2357 in 018c5ef
Since restore_bbox gets called within the above context manager, the final result is the layout engine continues to be what was set with fig.set_layout_engine(None).
PR Checklist
Documentation and Tests
Release Notes