I am using plotly through the R API and Shiny.
I have a surface plot with z values between 0 and 1.5.
I would like to fix the color-value mapping for my plot so that the colors scale represents z values from 0 to 1.5. So in this case the top and bottom number labels on the color bar would be 0 and 1.5 respectively and any data in the plot would map to the same color regardless of the range of the data. Right now the color bar is relative meaning there is a fixed range of colors and the min and max z values map to each end of the color bar. This does not make the comparison of surface charts easy. Here is the basic code I am using to generate it.
p <- plot_ly(x = xVal,y = Yval,z = Zval, type = "surface")
I haven’t been able to do this even in the plotly web GUI environment.