Skip to content

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

Open

Description

@anntzer

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:

Activity

  1. added this to the milestone on Apr 30, 2018
  2. modified the milestones: v3.0, v3.1 on Aug 11, 2018
  3. modified the milestones: v3.1.0, v3.2.0 on Mar 18, 2019
  4. QuLogic commented on Jul 28, 2020

    @QuLogic
    Member

    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.

  5. anntzer commented on Jul 29, 2020

    @anntzer
    ContributorAuthor

    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.

  6. github-actions commented on Apr 28, 2023

    @github-actions

    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!

  7. added
    keepItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github Action
    on Apr 28, 2023
  8. anntzer commented on Apr 29, 2023

    @anntzer
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions