Hi,
I have a surface plot with two traces:
# create figure
fig = go.Figure()
# Add surface trace
fig.add_trace(go.Surface(z=dict_inteff[select_eff[0]]["z1"],x=dict_inteff[select_eff[0]]["x1"],y=dict_inteff[select_eff[0]]["y1"],
cmin=dict_inteff[select_eff[0]]["zmin"], cmax=dict_inteff[select_eff[0]]["zmax"], colorscale="RdYlGn",
contours = {"z": {"show": True, "start": dict_inteff[select_eff[0]]["zmin"], "end": dict_inteff[select_eff[0]]["zmax"], "size": 0.2,"project_z":True}}
)
)
fig.add_trace(go.Surface(z=dict_inteff[select_eff[0]]["z2"],x=dict_inteff[select_eff[0]]["x2"],y=dict_inteff[select_eff[0]]["y2"],
showscale=False, cmin=dict_inteff[select_eff[0]]["zmin"], cmax=dict_inteff[select_eff[0]]["zmax"], colorscale="RdYlGn",
contours = {"z": {"show": True, "start": dict_inteff[select_eff[0]]["zmin"], "end": dict_inteff[select_eff[0]]["zmax"], "size": 0.2,"project_z":True}},
)
)
When I run this code contour lines are projected on the z axis.
But when I update the input data for the surface plot with a dropdown button:
buttons1 = [dict(method = "restyle",
args = [{
'x': [dict_inteff[select_eff[k]]["x1"], dict_inteff[select_eff[k]]["x2"]],
'y': [dict_inteff[select_eff[k]]["y1"], dict_inteff[select_eff[k]]["y2"]],
'z': [dict_inteff[select_eff[k]]["z1"], dict_inteff[select_eff[k]]["z2"]],
'cmin': [dict_inteff[select_eff[k]]["zmin"],dict_inteff[select_eff[k]]["zmin"]],
'cmax': [dict_inteff[select_eff[k]]["zmax"],dict_inteff[select_eff[k]]["zmax"]],
'contours':[ {"z": {"show": True,"start": dict_inteff[select_eff[k]]["zmin"], "end": dict_inteff[select_eff[k]]["zmax"],"size": 0.2,"project_z":True}},
{"z": {"show": True,"start": dict_inteff[select_eff[k]]["zmin"], "end": dict_inteff[select_eff[k]]["zmax"],"size": 0.2,"project_z":True}}]
}],
label = select_eff[k] ) for k in range(0, len(select_eff))]
the contour ist not projected on the z-axis as soon as I select another input data with the button. So the โproject_zโ:True inside the Button is not working.
What am I doing wrong?
Any help would be appreciated
Best regards
Peter