plotly / plotly/plotly.js

Categorical colorscales

Open
#1,747 9 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the heatmap trace and its current numeric colorscale and colorbar path; reproduce the linked categorical example and trace how string values are handled. Done means categorical heatmap values can map directly to a colorscale without numeric spoofing, with the behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.