Skip to content

Surface colorscale error for colorscales of length >=256 #3699

@jonmmease

Description

@jonmmease

It seems that there is a breakdown in the colorscale handling for the surface trace when the colorscale definition has length >= 256.

CodePen: https://codepen.io/jonmmease/pen/OGLOYK

For colorscale of length 255, things work as expected:
newplot(8)

For colorscale of length 256, the colorbar is displayed properly but the surface is not rendered and there is a console error:

Screenshot_20190329_191102

Error: ... map requires nshades to be at least size 256

If there is a hardware need for a colorscale length limit it would be great if this could be increased from 255 to 256 because that's a relatively common length for colorscales specified in libraries like matplotlib and colorcet.

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions