Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

FIX: remove repeated label legend logic#10064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dstansby merged 1 commit intomatplotlib:masterfromjklymak:fix-legend-logic
Dec 21, 2017

Conversation

jklymak
Copy link
Member

@jklymakjklymak commentedDec 20, 2017
edited
Loading

PR Summary

Fixes#10030,#10053,#10056.

Pre#9324, there was logic inFigure.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 betweenFigure.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 makingFigure.legend() the same as pre-9324Axes.legend() andnot removing the duplicate legend entries.

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@jklymakjklymak added this to thev2.1.2 milestoneDec 20, 2017
@jklymakjklymak added Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. API: changes API: consistency labelsDec 20, 2017
@jklymak
Copy link
MemberAuthor

This of course failed a test intest_figure that checked if the repeated label was ignored. I replaced the label name by"_y" instead of"y" to keep the images the same.

@@ -0,0 +1,20 @@
`Figure.legend` no longer checks for repeated lines to ignore
Copy link
Member

Choose a reason for hiding this comment

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

Can you put this directly inapi_changes.rst. The reason we put them in individual files is to avoid interminable rebases when the docs overlap, but thisshould be the only 2.1.2 related API change so that is not a risk ;)

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

No problem. But I’ll be away from machine for a while.

Copy link
Member

Choose a reason for hiding this comment

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

no worries!

Copy link
Member

@tacaswelltacaswell left a comment

Choose a reason for hiding this comment

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

Modulo moving the API docs

@jklymak
Copy link
MemberAuthor

... docs moved

@dstansbydstansby merged commit2f529fa intomatplotlib:masterDec 21, 2017
@jklymakjklymak deleted the fix-legend-logic branchDecember 21, 2017 14:51
jklymak added a commit that referenced this pull requestDec 21, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tacaswelltacaswelltacaswell approved these changes

@dstansbydstansbydstansby approved these changes

Assignees
No one assigned
Labels
API: changesAPI: consistencyRelease criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Milestone
v2.1.2
Development

Successfully merging this pull request may close these issues.

3 participants
@jklymak@tacaswell@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp