FIX: remove repeated label legend logic#10064
Merged
dstansby merged 1 commit intomatplotlib:masterfrom Dec 21, 2017
Merged
Conversation
4f421c9 to
d5e325d
Compare
6 tasks
Member
Author
|
This of course failed a test in |
tacaswell
reviewed
Dec 20, 2017
| @@ -0,0 +1,20 @@ | |||
| `Figure.legend` no longer checks for repeated lines to ignore | |||
Member
There was a problem hiding this comment.
Can you put this directly in api_changes.rst. The reason we put them in individual files is to avoid interminable rebases when the docs overlap, but this should be the only 2.1.2 related API change so that is not a risk ;)
Member
Author
There was a problem hiding this comment.
No problem. But I’ll be away from machine for a while.
1 task
39cee89 to
6ae1c88
Compare
6ae1c88 to
3ea5f83
Compare
Member
Author
|
... docs moved |
dstansby
approved these changes
Dec 21, 2017
jklymak
added a commit
that referenced
this pull request
Dec 21, 2017
Backport PR #10064 on branch v2.1.x
This was referenced Dec 21, 2017
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
Fixes #10030, #10053, #10056.
Pre #9324, there was logic in
Figure.legend()to not include duplicate labels in the legend if the linecolors or marker colors were the same. That logic was buggy, and didn't include all possible line properties, but presumably users ofFigure.legend()worked around this.In #9324, I homogenized the logic between
Figure.legend()andAxes.legend(). I still think that re-factoring was a good thing to do, but I missed thatAxes.legend()didn't have the no-duplicate logic in it. That exposed the bugs noted above.This PR, goes the other way of making
Figure.legend()the same as pre-9324Axes.legend()and not removing the duplicate legend entries.PR Checklist