Skip to content

Partially transparent markers with edges are rendered differently by agg, pdf and svg backends. #10035

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

Open
anntzer opened this issue Dec 18, 2017 · 4 comments
Labels
backend: pdf backend: svg keep Items to be ignored by the “Stale” Github Action topic: color/alpha topic: markers

Comments

@anntzer
Copy link
Contributor

anntzer commented Dec 18, 2017

Bug report

Bug summary

The baseline images for the rgba_markers test (rgba_markers.{png,pdf,svg}) clearly show differences in rendering between agg, pdf and svg:

rgba_markers

top left is the svg baseline rendered by inkview (inkscape) 0.92.2, top right is the png baseline, bottom left is the pdf baseline rendered by okular 17.08.3, bottom right is the pdf baseline rendered by gs 9.22 (gs is used by the testing framework to rasterize the pdf for image comparisons).

Code for reproduction

N/A

Actual outcome

On the right subplot, whether the central blue disk overlaps with the edge red circle depends on the backend... and, for the case of pdf, also on the renderer (so that part may possibly be a bug in eother okular or gs, but at least svg and png should not be different).

Expected outcome

All three backends should render hatching in a similar manner.

Matplotlib version

  • Operating system:
  • Matplotlib version: master
  • Matplotlib backend (print(matplotlib.get_backend())):
  • Python version:
  • Jupyter version (if applicable):
  • Other libraries:
@QuLogic
Copy link
Member

QuLogic commented Jul 28, 2020

Copying my comment from #15051:
I don't think we set knockout groups; I think this is an implicit behaviour in PDF:
Screenshot from 2020-07-28 18-50-59
Screenshot from 2020-07-28 18-51-25
It seems that some PDF viewers render this incorrectly.

@anntzer
Copy link
Contributor Author

anntzer commented Jul 29, 2020

Actually I think pdf's behavior is nicer, but we could at least think whether having consistent behavior across the backends is a goal here. For example mplcairo's pdf output is the same as for svg (i.e. with the visible overlap). (Perhaps it's just a matter of setting overprint to False? I haven't fully parsed the spec...)
See also #13360.

@github-actions
Copy link

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!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Apr 28, 2023
@QuLogic QuLogic added keep Items to be ignored by the “Stale” Github Action and removed status: inactive Marked by the “Stale” Github Action labels Apr 28, 2023
@anntzer
Copy link
Contributor Author

anntzer commented Apr 29, 2023

The svg part has been fixed by #11105, but understanding the difference in pdf rendering by ghostscript would still be nice (or perhaps it's just a matter of passing the right flags to it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: pdf backend: svg keep Items to be ignored by the “Stale” Github Action topic: color/alpha topic: markers
Projects
None yet
Development

No branches or pull requests

4 participants