Skip to content

Enables hatch alpha on SVG#16890

Merged
QuLogic merged 3 commits into
matplotlib:masterfrom
mnmelo:patch-1
Mar 24, 2020
Merged

Enables hatch alpha on SVG#16890
QuLogic merged 3 commits into
matplotlib:masterfrom
mnmelo:patch-1

Conversation

@mnmelo

@mnmelo mnmelo commented Mar 23, 2020

Copy link
Copy Markdown
Contributor

PR Summary

Partially addresses #16883

Adds stroke-opacity to hatch, but only if it's set to anything less than 1.

Unsure if it warrants a new figure for test comparison (svgs are small, though). Alternatively, could be tested against the PNG output, which is correct now (but may miss future simultaneous breakage).

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

mnmelo added 2 commits March 23, 2020 19:22
Partially addresses matplotlib#16883 

Adds `stroke-opacity` to hatch, but only if it's set to anything less than 1.
@mnmelo

mnmelo commented Mar 23, 2020

Copy link
Copy Markdown
Contributor Author

Turns out that the test test_artist.py::test_clipping[svg] already used an image with a hatched patch, with alpha. Updated that image, and now it checks for the case in this PR too.

@anntzer anntzer added this to the v3.3.0 milestone Mar 23, 2020

@anntzer anntzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if ci passes.

@tacaswell tacaswell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding a whats new entry.

👍 that we already had a test that exercised this so we don't have to add a new test :)

@mnmelo

mnmelo commented Mar 24, 2020

Copy link
Copy Markdown
Contributor Author

Hmm, this is erroring because it runs over the Azure Pipelines 60 min limit.
What's the procedure now?

@QuLogic QuLogic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you add the what's new entry and push, then there's no need to worry about the broken build.

Comment thread lib/matplotlib/backends/backend_svg.py Outdated
@mnmelo

mnmelo commented Mar 24, 2020

Copy link
Copy Markdown
Contributor Author

There. Let me know if you think the what's new should read differently (there really isn't much to say other than hatch alpha now works in SVG). Perhaps noteworthy is that SVG now seems to be the only vector output backed that can do the hatch alpha (I'm not entirely sure, though).

@QuLogic

QuLogic commented Mar 24, 2020

Copy link
Copy Markdown
Member

Thanks @mnmelo!

@QuLogic QuLogic merged commit db55918 into matplotlib:master Mar 24, 2020
@mnmelo mnmelo deleted the patch-1 branch March 24, 2020 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants