plotly / plotly/plotly.py

Problems with "Reds", "Turbo", "Inferno" (...?) colorscales

Open
#3,860 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

There seems to be an issue with the "Reds" and "Turbo" colorscales. I couldn't find an existing issue about this, so here is how to reproduce: I just got this example from plotly page:
https://plotly.com/python/dropdowns/#update-several-data-attributes
And added the "Reds" and "Turbo" colorscales.

The "Reds" seem to work, but it is inverted when comparing to the "Blues" and "Greens":
Screenshot 2022-08-20 at 16 25 34Screenshot 2022-08-20 at 16 31 13Screenshot 2022-08-20 at 16 25 45

The "Turbo", on the other hand, shows up like a "coolwarm" colorscale instead:
Screenshot 2022-08-20 at 16 25 58

These two are different than the ones described on the documentation here: https://plotly.com/python/builtin-colorscales/#builtin-sequential-color-scales

I had similar issues when using "Plotly.update" with plotly.js to update the coloscales.

edit: Also the "Inferno" shows as the "coolwarm" one:
Screenshot 2022-08-20 at 17 09 21
Probably there are others too.

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 linked Plotly Python dropdown example and the reported Plotly.update reproduction, then compare the Reds, Turbo, and Inferno results with the builtin sequential color-scale documentation. Trace where these colorscales are selected or transformed; done means they render with the documented palettes in both reported update paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.