Skip to content

Conversation

kateharwood
Copy link
Contributor

Closes #54

@kateharwood kateharwood requested a review from eujing April 6, 2021 19:38
Comment on lines +336 to +338
set.seed(colorSeed)
forecasterRand <- sample(unique(df$forecaster))
colorPalette = setNames(object = viridis(length(unique(df$forecaster))), nm = forecasterRand)
Copy link
Contributor

Choose a reason for hiding this comment

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

With viridis, the colors sometimes become quite similar after shuffling.
But it usually gets quite distinct within a few more shuffles!
I personally don't know of other qualitative colorblind-friendly palettes that support the number of categories required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I explored the options a bit and thought this one worked the best of the ones I looked at. Definitely open to using another package though if there is a better one.

@kateharwood kateharwood merged commit 05498f4 into dev Apr 7, 2021
@kateharwood kateharwood deleted the colors branch May 4, 2021 19:38
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.

Address color-similarity issue
2 participants