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.
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
ENH: expose max_labels in ColorMap #90
ENH: expose max_labels in ColorMap #90
Changes from 2 commits
e6faede
672b602
88a0082
ab2948e
10be578
59b392e
17c2709
c27a2c6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Not related to your change directly, but I don't understand why we add empty strings in between. There doesn't seem to be a need for it. If the idea is to make the length of
legend_ticks
correspond tolegend_values
, it's not even correct since we add one more tick than value.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.
Don't know but commenting it out doesn't change anything apparent.
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.
I understand the desire to always show the last value. But this means we may have differing distances between labels. For example consider values
[0, 1, 2, 3]
andmax_labels=3
. Should the ticks then be[0, 2]
(current situation, equal distance between values but missing last value) or[0, 2, 3]
(your PR, unequal distance between values but including last value)? I don't know which is better at the moment, but in doubt I tend to stick with the status quo. What do you think?Is there a way to have both? Include the first and last value, and have equal spacing? Or, at least, have the last and second to last label not be too close together.
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.
That is a good point, I didn't realise that.
I don't think so. We're picking from a list of variable length. We're not interpolating values here (and I don't think we should).
I am not sure either which of the options is better. The addition of the last value makes it easier to read a bit but it can cause weird overlaps.
Let's keep the status quo for now. I will revert the addition of the last value.