plotly / plotly/graphing-library-docs
example code doesn't work
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 59
- Forks
- 72
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 3
Description
Hi,
The example code in matplotlib_to_plotly() (https://plotly.com/python/v3/matplotlib-colorscales/) doesn't work due to a TypeError.
Anyway, I am sure that the argument meant to be passed to this function is the [colorscale]_rgb list ... which again throws a TypeError, but this can be fixed by editing one line:
C = list(map(np.uint8, np.array(cmap_rgb[k])*255))
Then it works.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the matplotlib_to_plotly() example at the linked Plotly documentation page and reproduce the reported TypeError. Compare the cmap_rgb conversion with the one-line change described in the issue; done means the documented example runs without the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data-visualization, documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100