amani
November 20, 2018, 3:16pm
1
Hi,
I want to define colorscale of my 3D surface plot based on z-axis values.
for example, I want points with z-axis value < -10 in red color, points with z-axis value between - 10 and 10 in green and point with z-axis value >10 in blue.
Is it possible to do that ?
Regards,
amani
November 21, 2018, 1:06pm
3
All I want is to do something like this
colorscale: [
[’-10’, ‘rgb(255, 0, 0)’],
[‘0’, ‘rgb(0, 0, 255)’],
[‘10’, ‘rgb(102, 0, 153)’]
],
ColorScale will be depending on zaxis but I want to specify values (like in the example above) not percentage.
etienne
November 21, 2018, 4:38pm
4
Colorscale values must be between 0
and 1
. Use cmin: -10
and cmax: 10
to set the bound in data space.
More info:
amani
January 9, 2019, 10:33am
5
I see that cmin and cmax have been removed from data in version 1.43.0. Is there any substitution ?
You mean from
var gd = document.getElementById(/* id of your graph */)
gd.data[0].cmin
?
in that case
var gd = document.getElementById(/* id of your graph */)
gd._fullData[0].cmin
should do the trick.