example code doesn't work
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- numpy, python
- Domain
- data-visualization, documentation
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.
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.
- Dominant language
- Jupyter Notebook
- Stars
- 59
- Forks
- 73
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 4
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.
More from plotly/graphing-library-docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
plotly/graphing-library-docs#406 ·
-
documentation enhancement
plotly/graphing-library-docs#383 · 1 assignee ·
-
documentation enhancement
plotly/graphing-library-docs#378 · 1 assignee ·
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
plotly/graphing-library-docs#341 ·
-
enhancement
plotly/graphing-library-docs#338 · 1 comment · 1 assignee ·
All issues in plotly/graphing-library-docs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google/libultrahdr#485 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
gradio-app/gradio#13887 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100