Skip to content

[query] Generate infinite discrete colors#11613

Merged
danking merged 7 commits intohail-is:mainfrom
johnc1231:johnc-more-color
Mar 24, 2022
Merged

[query] Generate infinite discrete colors#11613
danking merged 7 commits intohail-is:mainfrom
johnc1231:johnc-more-color

Conversation

@johnc1231
Copy link
Contributor

Prior to this PR, when someone specified they'd like to color a plot by a discrete variable, we used a predetermined list of 10 colors to assign colors. If something used more than 10 colors, it'd wrap around.

This PR changes scale_color_discrete to be an alias for scale_color_hue, as it is in ggplot. scale_color_hue works by sampling evenly spaced points around a color wheel to create a set of maximally distant colors.

The old behavior is now achievable by using scale_color_manual, which takes in a list of colors and assigns colors based on that list.

@danking danking merged commit 6694966 into hail-is:main Mar 24, 2022
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.

3 participants