You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating an animated plotly.express chart using animation_frame works fine, but I realized that when selecting a certain value on the slider, most markers are not visible. It all works fine when I double click on the chart.
plotly==4.0.0 pandas==0.24.2
import random
import plotly.express as xp
import pandas as pd
import plotly
df = pd.DataFrame({
'date': pd.date_range('2019-01-01', '2019-12-31'),
'number': random.choices(range(1,200), k=365)
})
df['month'] = df['date'].dt.month
df.head()
date number month
0 2019-01-01 152 1
1 2019-01-02 127 1
2 2019-01-03 39 1
3 2019-01-04 195 1
4 2019-01-05 69 1
xp.scatter(df, x='date', y='number', animation_frame='month')
Selecting month 6 gives the following empty chart: