Merged
Conversation
Member
Author
|
It looks like Azure is glitching on two jobs. I presume there must be a way to stop and restart them, but I haven't been able to find it. |
jklymak
reviewed
May 19, 2021
|
|
||
| # orig_handle is a PolyCollection and legend_handle is a Patch. | ||
| # Directly set Patch color attributes (must be RGBA tuples). | ||
| legend_handle._facecolor = first_color(orig_handle.get_facecolor()) |
Member
There was a problem hiding this comment.
This is more invasive than my change so a couple of questions. 1) why set directly? 2) does this cover more cases, in which case should we add more tests?
Member
Author
There was a problem hiding this comment.
- We want all the special-case handling to be done by the PolyCollection, after which we simply hand off the results to the Patch. See https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/patches.py#L249 for another example of this approach.
- I don't know. I think it is more a question of whether enough legend with/without hatching cases are tested than of any expected changes in behavior.
More invasive? You could describe it that way, but I view it as a cleanup and an overall simplification.
jklymak
approved these changes
May 19, 2021
QuLogic
approved these changes
May 20, 2021
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
May 20, 2021
jklymak
added a commit
that referenced
this pull request
May 20, 2021
…265-on-v3.4.x Backport PR #20265 on branch v3.4.x (Legend edgecolor face)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
Simplify the legend handler for PolyCollection.
Alternative to #20260; closes #20258.
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).