Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

example code doesn't work

Open
#156 0 comments 0 reactions 0 assignees View on GitHub

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

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

  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.

More from plotly/graphing-library-docs

All issues in plotly/graphing-library-docs

Similar issues

More Data Visualization issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.