Black Lives Matter. Please consider donating to Black Girls Code today.

Show/hide data point in scatter3d


I have multiple traces in a scatter 3d chart, each trace has 2000+ data points. I’d like to hide/show data points of all the traces, using a slider-like control. So the plot will start with no data when slider at 0 position, then show the data progressively as the slider moves right. Then all the data is shown when the slider reaches max position at the right.

I’ve looked at using Plotly’s sliders with ‘update’ function and rebuilding the x/y/z data array. That doesn’t seem to work for me (most likely my fault). Is this the correct approach? Is there a way to show/hide data points instead of rebuilding the data object of each traces for each slider step?