SolaraViz: Fast option for dynamic plots
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.9k
- Forks
- 1.3k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 20
Description
It would be useful to have a fast, simple option for dynamic plot updating (streaming) capabilities in our Solara-based visualization module, allowing for the addition of data points each timestep without redrawing the entire plot, ideally with a fluent animation between.
### Options
Some options I found:
1. **Matplotlib**:
- We currently use it, maybe it can be made faster.
- Use `FuncAnimation` or similar methods to update plots.
2. **Altair**:
- Also currently already there.
- Update the chart data periodically and re-render using Solara.
- Limitation: Might involve partial re-drawing due to Altair's design.
- https://altair-viz.github.io/user_guide/interactions.html
3. **Plotly**:
- Utilize [`FigureWidget`](https://plotly.com/python/figurewidget/) for efficient updates without full re-rendering.
- Seems recommended for smoother updates and better performance with complex plots.
- Maybe https://dash.plotly.com/live-updates
4. **Bokeh**:
- Leverage [`ColumnDataSource`](https://docs.bokeh.org/en/latest/docs/user_guide/basic/data.html) to stream data directly into plots.
- Offers more control over the streaming process and seamless integration with Python backends.
### Steps
- Evaluate each library's performance and ease of integration with Solara.
- Implement the most suitable solution and ensure compatibility with existing modules.
- Update documentation with examples and usage guidelines.
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
Start by locating the Solara-based visualization module and the existing Matplotlib and Altair integrations. Benchmark the listed libraries for streaming updates and integration effort, then implement the selected approach with compatibility for existing modules. Done means the chosen solution supports incremental data points, includes an animation example, and has updated documentation with usage guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, plotly, python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100