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.)
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.
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.
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 Dec 18, 2017
I thought this was something we fixed in 2.0
QuLogic commented on Apr 21, 2023
The difference in colour is the same as #10035, as all the artists have alpha.
QuLogic commented on Apr 21, 2023
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?
anntzer commented on Apr 22, 2023
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.
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!