-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Sort and uniquify style entries in figure options. #5342
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
Sort and uniquify style entries in figure options. #5342
Conversation
487e517
to
4cab2e7
Compare
Fixes the first two points of matplotlib#5341.
Kindly requesting some help here: I honestly can't see what the test failure is due to or how it is related to this PR. |
The test failure is likely intermittent and not related to your work. I have restarted the test |
Looks like @jenshnielsen was right here. The tests are now passing. Just played with this and one subtle thing that struck me is that the special values of "None" and "nothing" are now sorted somewhere in the middle (by |
markers = list(six.iteritems(MARKERS)) | ||
|
||
def prepare_data(d, init): | ||
"""Prepare entry for FormLayout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please document the expected input parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
The current behavior is that the multiple entries of I could special-case them to the top, but if we go that route we may as well come up with a better order of the markers (such as one that keeps triangles, squares, pentagons and hexagons next to each other and in that order). |
The code for uniqueifying the symbols seems too complex/sutble for what it is doing. I think what I proposed in the now folded comment is easier to read/understand. |
babb03e
to
2bbffe1
Compare
Perhaps this new version is clearer? |
Yes, that is much clearer |
…ure-options ENH: Sort and uniquify style entries in figure options.
Fixes the first two points of #5341.