-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add rasterized
option to contourf
#29582
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
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 week or so, please leave a new comment below and that should bring it to our attention. 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.
I've had a good look and can't see where the test for this would naturally fit in |
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.
Thanks @AdamOrmondroyd and sorry you didn't get a response sooner. I think test_contour.py would be a reasonable place to add a test.
Co-authored-by: Ruth Comer <[email protected]>
…lib into rasterizecontourf
I agree on both apologizing that this did not get attention earlier and adding a baseline image. It is a surprising oversight that this has been missing! |
Usually leaving the tolerance to default is fine. Sometimes it needs to be a little higher to accommodate slightly different results on different platforms. So you can just wait to see if CI passes. |
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.
Looks good thanks!
do I need access? I don't have a merge button |
No, we just require two approving reviews before merging code changes. Thanks for your work on this @AdamOrmondroyd and congratulations on your first Matplotlib PR! We hope to hear from you again. |
PR summary
Hi, this is my first PR to matplotlib!
The rasterization documentation suggests one can add
rasterized=True
tocontourf
, similar topcolormesh
. This doesn't do anything besides warn the user thekwarg
hasn't been used. Setting the resultingQuadContourSet
to rasterised causes another warning, but seems to work fine. #27669 picks up on this.This PR addresses both issues, still need to add tests.
(screenshot of) unrasterized foo.pdf


(screenshot of) rasterized foo.pdf
Closes #27669
PR checklist