Hi everyone, I am plotting annotations on a Scatter3d plot and would like to use the clicktoshow function that I find in layout.annotations, but I get “Invalid property specified for object of type plotly.graph_objs.layout.scene.Annotation: ‘clicktoshow’”.
Any idea if there’s a way to use it? Reproducible code below. Thanks!
import plotly.graph_objects as go
fig = go.Figure()
x,y,z= np.array([
[0, 1, 2, 3, 4, 5, 6, 7, 8],
[0, 1, 3, 2, 4, 3, 4, 6, 5],
[0, 2, 3, 5, 4, 6, 4, 6, 5]
])
fig.add_trace(go.Scatter3d(
x=x,
y=y,
z=z
)
)
annotations = [dict(x=x[i],y=y[i],z=z[i],text=str(x[i]),font=dict(size=10, color="white"),bgcolor="black",
# clicktoshow=False, #<---this is the incriminated line
) for i in range(len(x))]
fig.update_layout(scene=dict(annotations=annotations))
fig.show()