✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚾️ It's finally Baseball season! Root for the home team... & Register for our Sports Analytics Webinar!

Fixing view of surface while updating layout

I’m using plotly to plot a surface, and then using dash to change which parts of the surface are visible using a RangeSlider on the range of the z-axis. However, if I rotate the surface from its initial orientation, moving the slider instantly realigns the image with its initial orientation. I would like to have the orientation fixed while moving the slider.

I thought jimmybow’s mydcc package would do this, but even just updating the layout with mydcc.Relayout, the camera goes back to its initial orientation.

If I could obtain the camera coordinates at the start of any slider move, then I think I could have them fixed throughout the move, similar to this 2D fix. Note that the specific fix there doesn’t work for me, because I change the surface by modifying the range of axes.

Thanks for any help you can provide.