The basic problem is that transparency information isn't being correctly to PDFs when hatching is used.
I'm running in OS X (Yosemite) with the default MacOSX matplotlib backend and using matplotlib 1.4.1. Is there any reason why this setup should fail to produce transparent PDF output? This used to work in the past (with OS X Mavericks and an earlier version of matplotlib) but I'm not sure exactly what change has caused this problem.
If the following code is run, the problem can be seen in with_hatch.pdf, but not in any of the other output files.
I just ran into this as well. Is there any sort of workaround? I guess I could just save as png and include the figure I'm having issues with as a raster image in my paper.
I'm seeing the same thing in the png as in the pdf. I suspect the reason you are seeing them differently is that the hatch pattern is quite fine, so in conjunction with antialiasing, it is lightening most of the pixels. This is seen most clearly when you zoom in.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Sounds good! Although not really clear what fixed it.
There is a PR #17049 that is "almost done" which would fix it. Plus that there are some issues where different PDF renderers show the information differently.
I'll leave it open and then we can possibly close it once we are certain that it is fully fixed and which PR did it.
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
tacaswell commented on Jan 31, 2015
punting to 1.4.x, this isn't going to get done immediately and I don't want to block 1.4.3 on this. Any protests?
mdboom commented on Feb 2, 2015
I think punting is fine -- I'm just noticing this now and might have some time to look at it soon, but don't let this hold you up.
ngoldbaum commented on Jun 24, 2015
I just ran into this as well. Is there any sort of workaround? I guess I could just save as png and include the figure I'm having issues with as a raster image in my paper.
efiring commented on Jun 24, 2015
I'm seeing the same thing in the png as in the pdf. I suspect the reason you are seeing them differently is that the hatch pattern is quite fine, so in conjunction with antialiasing, it is lightening most of the pixels. This is seen most clearly when you zoom in.
tacaswell commented on Jul 17, 2015
ping @jkseppan
8 remaining items
blalterman commented on May 10, 2016
In what directory is backend_pdf.py?
tacaswell commented on May 10, 2016
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/backend_pdf.py
On Mon, May 9, 2016 at 11:50 PM balterman notifications@github.com wrote:
github-actions commented on Jun 5, 2023
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
jemrobinson commented on Jun 5, 2023
Just tested with:
and this seems to be solved. See the attached PNG and PDF below.
with_hatch.pdf
oscargus commented on Jun 5, 2023
Sounds good! Although not really clear what fixed it.
There is a PR #17049 that is "almost done" which would fix it. Plus that there are some issues where different PDF renderers show the information differently.
I'll leave it open and then we can possibly close it once we are certain that it is fully fixed and which PR did it.
github-actions commented on Jun 5, 2024
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!