Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to reverse legend #98

Merged
merged 2 commits into from
Jul 7, 2018
Merged

Add option to reverse legend #98

merged 2 commits into from
Jul 7, 2018

Conversation

jonaschn
Copy link
Owner

@jonaschn jonaschn commented Jul 7, 2018

No description provided.

@@ -147,6 +147,9 @@ def xFuncFormatter(x, pos):
handles, labels = plt.gca().get_legend_handles_labels()

order = argsort([natural_order(label) for label in labels])
if reversed_legend:
order = list(reversed(order))
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could just use order.reverse() and make it in-place, don't bother though if it's too much effort

Copy link
Owner Author

Choose a reason for hiding this comment

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

if I remember correctly I tried this but it didn't work.
anyways, I will merge it ;)

@jonaschn jonaschn merged commit b44d8c9 into master Jul 7, 2018
@jonaschn jonaschn deleted the reverse-legend branch July 7, 2018 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants