Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Surfacecolor and ColorScale

Task : Need to color the surface based on the a different parameter than z axis values.

What i have tried till now.

Question : Does the number of elements in the 2D array representing the Surfacecolor should be equal to the number of array elements for the z axis ?

As for example if i remove 1 arrray from the following example,

the plot doesnt get generated.

Need a brief explanation about the surfacecolor and colorscale
More examples would also help.

My final Task is that i have 5 categories and i need to color the surface independent of Z axis and the 5 categories should be of different colors!.

Yes. surfacecolor intends to map each item z to a color.