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

Multiple line scatter for visualization of cell tracking with jupyter notebook

Hi guys,
I wonder if anyone know how to create interactive multiple line scatters using plotly with jupyter notebook?
I wanted something like this but with the interaction offered by plotly.

with colors indicates the tracks with final position toward a side.

Since there will be more than hundreds of tracks, does this mean that i will need to create traces for each track?

Thanks in advance if you can share some tips.

@davince As long as all your plots have the same type=‘scatter’ , you can define a function as follows:

def my_trace(x, y, **kwargs):# kwargs are keys you intend to set in the trace definition
    return dict(type='scatter',
                     line=dict(width=your_width, color=your_color),

Analogously, define a function for layout:

xaxis_style=dict(...)#your preferences for x-axis style

def my_layout(title='Corresponding title', **other_kwargs):
        return dict(title=title,
                         #other keys-values

and call these functions to get data and layout for each plot.