plotly/graphing-library-docs

example code doesn't work

Opened this issue · 0 comments

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.