Hi!
I’ve got a problem. I need to fix min and max values for heatmap colorscale. I’ve tried to create a custom one, but plotly ignored CS array (array of ticks for colorbar), and established min value for color bar as min value in TWW array (2d array with intensity)
Q1=np.max(TWW)
Q2=np.min(TWW)
Q=np.max([np.abs(Q1),np.abs(Q2)])
nt=10
dQ=2.0*Q/nt
CS=dQ*np.arange(nt+1)-Q
print(CS)
print(n2,n1,m2,m1)
trace=go.Heatmap(x=xp[n1:n2], y=yp[m1:m2], z=np.transpose(TWW[n1:n2,m1:m2]),colorbar=dict(
title="Twist",titleside="top",tickvals=CS))
data=[trace]
layout = go.Layout(scene = dict(
xaxis=dict(nticks=20,range=[0, 1]),
yaxis=dict(nticks=20,range=[0, 1])
))
fig=go.Figure(data=data,layout=layout)