-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Handle rasterization start & stop only from Artist #24293
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
Conversation
As mentionedd in 3.4.0 api changes behaviour.rst the tracking should be handled there. This commit avoids calling stop_rasterizing method twice in row making it throw an exception. Fixes matplotlib#24235
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers
or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
Thanks! Can you please add a test that fails in current main, but passes with this? (Probably similar to the example in #24235 but possibly shorter.) Not sure if this only happens for PDF files, but if that is the best way you can probably write to a buffer rather than stating a file name and make clear that it is a smoke test with a comment like |
This is not the correct fix as it eliminates the functionality of resterizing all artists below a given zorder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this does fix the reported issue, it eliminates another functionality.
The correct fix is to pull the depth counting logic from matplotlib/lib/matplotlib/artist.py Lines 24 to 64 in d85e980
agg_filter that we do not want here and a refactoring of the depth counting code that would compose the correct way with the other logic an that wrapper is not worth the complexity for avoiding 2 copies of like 10 lines of code.
Probably should also move the |
I believe this has been replaced by #24768. |
PR Summary
As mentionedd in 3.4.0 api changes behaviour.rst the tracking should be handled there.
This commit avoids calling stop_rasterizing method twice in row making it throw an exception.
Fixes #24235
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst