FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Hatching is rendered differently by agg, pdf and svg backends. · Issue #10034 · matplotlib/matplotlib · GitHub

Repository navigation

Hatching is rendered differently by agg, pdf and svg backends. #10034

Closed

Description

Bug report

Bug summary

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

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

  • the colors of the stars are slightly different between png and svg.
  • the pdf backend render the stars as empty rather than filled.

Expected outcome

All three backends should render hatching in a similar manner.

(As a side note, mplcairo generates pdf and svg that render like the png.)

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 Dec 18, 2017
  2. tacaswell commented on Dec 18, 2017

    Member

    I thought this was something we fixed in 2.0

  3. QuLogic commented on Apr 21, 2023

    Member

    The difference in colour is the same as #10035, as all the artists have alpha.

  4. QuLogic commented on Apr 21, 2023

    Member

    It's strange that there's a difference, as PDF uses a Op.fill_stroke, and the resulting SVG does have both a fill and stroke defined in the pattern. Oops, misread the results from SVG; it's just the alpha that's wrong there.

    BTW, does this come out correctly in mplcairo?

  5. anntzer commented on Apr 22, 2023

    ContributorAuthor

    mplcairo does correctly fill the stars in pdf output, and from a quick look (I haven't actually checked the value, just a visual check) gets an alpha closer to the right value in svg.

  6. github-actions commented on Jun 19, 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!

  7. added
    keepItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github Action
    on Jun 19, 2024
  8. removed
    keepItems to be ignored by the “Stale” Github Action
    on Apr 11, 2026
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

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL