Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Plotly.js surfaceplot refreshing data in time

Hi, I have a problem to update data in 3d surface plot in plotly JS. I would like to build 3d surface plot, which will be updated with new data in time (like a streming data). How should I do it correctly to update data in the plot without a refreshing setting of the camera?

Edit:

I would like to build smh like https://plot.ly/create/ -> surface plot. There I can change data in the array (like excel) to automatically refresh the plot. How to do smh like this?

Calling restyle (as in https://codepen.io/etpinard/pen/ZoaaJG?editors=0010) shouldn’t reset the camera. plot.ly/create currently uses newPlot so yeah the camera position is reset.

@etienne Thank you for your response, yes I tried restyle() with resetting camera position. But here https://plot.ly/create/ it works properly - so maybe it is possible to do it?

So how to do it like this?

Hi again, any suggestions?

Can you clarify what you’re asking again.

I think I replied to

Is there anything else?

Animation worked for me.