-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Categorical colorscales #1747
Comments
Thanks for writing in. More generally, we should start thinking about adding categorical colorscales that could be applied not only to heatmap traces but to scatter bubble charts and choropleths to name a few. In the meantime, here's a (somewhat hacky) workaround: https://codepen.io/etpinard/pen/GmbVZq?editors=0010 |
Cheers. If you have pointers on where to look I'd be glad to have a try, though my JS is not exactly the greatest |
This comment has been minimized.
This comment has been minimized.
Let's resurrect this guy :) As a starting point, I propose a new flag somewhere that says "treat the values in the color array as discrete and generate a categorical colorscale" that way we could pass in either numbers or non-css strings and have a categorical colorscale/colorbar be generated. |
Additional thoughts on this from a conversation with @alexcjohnson when he was in Montreal: for categorical colorscales we |
This comment has been minimized.
This comment has been minimized.
@etpinard can you propose something here plz? |
+1 |
Do we have a solution now? I have also exhausted all my resources to plot cetagorical values in heatmap. Do we have categorical color scales for heatmaps ? |
Would it be possible to add the ability to use categorical (ie, String) values in a heatmap, mapped to a color scale?
This is currently possible only by mapping to numeric values and spoofing a colorscale and colorbar.
EG: https://i.stack.imgur.com/1MS66.png
Again apologies, in this case I realise this could require a radical overhaul of that trace
The text was updated successfully, but these errors were encountered: