-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
The face color of a patch affects its hatches in PDF viewed with Acrobat Reader #9894
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
Comments
|
I have an additional example where the hatch completely gets lost or rather covered by a non-transparent layer (so possibly the same problem as here).
|
@mschauer Did you mean |
No, it does not work for me as written above (note the difference is between |
@mschauer Oh Gosh I'm tired: you're right... Sorry for the noise! |
Thanks for picking that up with such a nice bug report, by the way. |
@afvincent you need to rebuild all the C extensions when you switch to such an old version. |
Is there any new on this? I just ran into this and thought it might be a quite important feature when making publication quality figures. |
If there was a PR it would probably be linked. |
Probably, yeah probably. This is the most typical kind of answer, that does not help. |
As noted earlier in the thread, one solution is to use the https://github.com/anntzer/mplcairo renderer which does not suffer from this issue. If an issue is not fixed more than a year after it was opened, it is often because we simply lack either the expertise, or the bandwidth to fix it (in this specific case, I fear that few of the current devs, if any, are familiar with the internals of the pdf backend). If it is that important for you, we would of course consider any suggested patch. |
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! |
I haven't actually checked, but this seems likely to still be valid. |
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! |
Bug summary
Originally reported in the thread of #8431.
When using hatches with a patch and exporting to a PDF, the patch face color seems to also be applied to (or to overlay) the hatches when viewing the file with Acrobat Reader, which is neither the case in the Matplotlib interactive window nor when opening the same PDF with Evince. Not sure if it is the alpha value of the face color that is wrongly interpreted, or simply the z-order between the face color and the hatches.
Code for reproduction
Actual outcome
An exemple of the PDF produced by the snippet above:
with_2.1.0.post933+gd046efbc2.pdf
A screenshot comparing this file opened with Evince (on the left) and with Acrobat Reader (on the right):

I get a similar output/behavior with Matplotlib 2.0.0. However, with Matplotlib 1.5.3, something is going wrong and I am thrown the following traceback below, so I do not know if it is really a kind of regression.
Expected outcome
The same behavior with both PDF viewers, i.e. the hatches not being affected by the the face color of the patch.
Matplotlib version
print(matplotlib.get_backend())
):The text was updated successfully, but these errors were encountered: