Animation glitch with missing data
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
When having missing at the start time. Scatter markers are not being draw. When another marker has no values after a certain point in time this point "converts" to the no drawn point.
Im using plotly 4.5.0 in Python 3.7 with Anaconda.
Here is an example:
df = pd.DataFrame([
{"time": 0, "id": "A", "x": 0, "y": 0}, # No data for B at timestep 0
{"time": 1, "id": "A", "x": 0, "y": 1},
{"time": 1, "id": "B", "x": 1, "y": 0},
{"time": 2, "id": "A", "x": 0, "y": 2},
{"time": 2, "id": "B", "x": 1, "y": 1},
{"time": 3, "id": "B", "x": 1, "y": 2}, # No data for A at timestep 3
])
fig = px.scatter(
data_frame=df,
x="x", y="y",
color="id",
animation_frame="time",
hover_data=df.columns,
range_x=(-1, 3),
range_y=(-1, 3),
)
fig.show()

Unfortunately I can't upload an animation of the "conversion".
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the provided Python 3.7 and Plotly 4.5.0 example and inspect the generated scatter animation frames. Compare frames where an id is absent at the start or end of the data, then verify that missing markers remain handled consistently rather than disappearing or converting. Done means both missing-data cases animate without the reported glitch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100