Plot Functionality on Animated Frames with Very Large Datasets


I am relatively new to plotly and working on animating some plots I have that contain a very large amount of data.

The format of the specific plot is a large plot of x-y coordinates that are time dependent with a timeline of properties of the coordinates below, so something like this:

------ position coordinate plane--------

|-------time history of -----------------------|

The position coordinate plane has 17 small data traces that correspond to boundaries.
It also contains any number of traces corresponding to multiple moving points with the full time history of those paths as lines.
The time history has a domain of date-time information and a range [1,4] (re-labeled) showing color coded properties for the position information.

I currently have these plots animated to show a moving point along the required traces and a line to move along the time history to indicate what time the current position was indicated.
My problem is that after hitting the โ€œPlayโ€ button, the zoom functionality removes every piece of information except the animated frames AND I am having trouble connecting a time scrollbar to the animation.

I want to stress that the datasets are very large and adding the entire time history to every frame for redraw will crump the htmlโ€™s ability to be effective because it will be too large.

Begin code:

fig = make_subplots(rows=2, cols=1, 

#16 of these
for bound in boundary:
    fig.add_trace(go.Scattergl(x=bound['x'], y=bound['y'])

#Any number of these
for trace in time:

#Two of these
for color in ['red','blue']:

#Time history of properties
#Any number of traces here
for property in properties:

#Then buttons
fig.layout.updatemenus = [
            args=[None,{'frame': {
                               'easing': 'cubic-in-out'},
             args=[[None],{'frame': {
                                 'easing': 'cubic-in-out'},

#Finally the animation frames
    go.Frame(data = [
        list of go.Scatter with x and y values as singular points from required traces,
        go.Scatter(x=[currentTiime,currentTime], y=[1,4])
        traces=listOfTracesBeingAnimated) for k in range(number of time points)])

It seems the recommended methods are to add all data to every frame, but, again, there are thousands of data points in most of these traces, so adding the entire trace to every frame will make the plot unusable, but I would like to keep zoom functionality and maybe be able to add a time scroll bar.


Changing โ€œScatterglโ€ to โ€œScatterโ€ increases the data weight of the whole HTML, but not by more than putting every trace in every frame and seems to fix the problem when adding extra traces as recommended by examples.

It seems the stress put on the โ€œnameโ€ argument of go.Frame for animation with a slider bar wasnโ€™t stressed enough for me to get it. the โ€œnameโ€ argument of go.Frame must match the args passed to the slider steps.

Welcome to the forums, @TreGOber!

Not sure if this helps: