I want to animate the plotted multiple lines in one frame. But, it is displaying only one.
I had tried various approaches but none of them working it is displaying one line at a time.
Multiple lines in the frame is not working.
I had even tried out with plotly express but canβt able to add animation for more lines in one frame of animation.
import plotly.graph_objects as go
fig = go.Figure(
data=[go.Scattergeo(
lon = [80.32,80.31370],
lat = [13.30,13.26900],
mode = 'lines',
line = dict(width = 1,color = 'red'),
)],
layout=go.Layout(
updatemenus=[dict(
type="buttons",
buttons=[dict(label="Play",
method="animate",
args=[None])])]
),
frames=[go.Frame(data=
[go.Scattergeo(lon=[80.36, 80.34466], lat=[13.36, 13.18674],mode='lines'),
#go.Scattergeo(lon=[[80.36, 80.34466],[80.38, 80.33993]], lat=[[13.36, 13.18674],[13.34, 13.2387]],mode='lines')]
go.Scattergeo(lon=[80.38, 80.33993], lat=[13.34, 13.2387],mode='lines')]
),
go.Frame(data=[go.Scattergeo(lon=[80.56, 80.56236], lat=[13.3, 13.18335],mode='lines')]),]
)
fig.show()
Like here at 2nd time stamp screenshot is placed in which one line is only appearing. I want 2 lines for that timestamp. Same way I want to generalize for any lines in a particular timestamp.
Any help will be highly appreciated!!!