I am making 3d scatter plots and I would like some traces to remain in the exact same position independently of what other traces are shown/hidden. However, when I hide some traces (usually the ones that contain vertices/edges near the external borders of the plot) every trace changes position, as if plotly automatically โzoomed inโ to show the remaining traces as big as possible.
Is there a way to keep the viewpoint always fixed? I am already specifying the eye coordinates, but hiding traces still changes the camera position.
I suspect that when you are hiding a trace, the axes range is not preserved and causes change in the position of visible traces. Before hiding any trace, it is recommended to set xaxis_range, yaxis_range, zaxis_range = [min, max], i.e. the [minimum, maximum] values among x, y, respectively z data in all traces.
To get a real help you should have posted a reproducible example. From your post I cannot deduce how are you hiding some traces. Are you animating them? If the reported issue occurs during animation, then for each axis you have to set autorange=False.