https://github.com/stephane-caron/matplotlive
Stream live plots to a matplotlib figure
https://github.com/stephane-caron/matplotlive
Last synced: 3 months ago
JSON representation
Stream live plots to a matplotlib figure
- Host: GitHub
- URL: https://github.com/stephane-caron/matplotlive
- Owner: stephane-caron
- License: apache-2.0
- Created: 2024-05-09T07:29:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-29T09:21:49.000Z (9 months ago)
- Last Synced: 2025-02-25T03:06:09.339Z (3 months ago)
- Language: Python
- Homepage:
- Size: 146 KB
- Stars: 77
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# matplotlive
[](https://github.com/stephane-caron/matplotlive/actions)
[](https://stephane-caron.github.io/matplotlive/)
[](https://coveralls.io/github/stephane-caron/matplotlive?branch=main)
[](https://anaconda.org/conda-forge/matplotlive)
[](https://pypi.org/project/matplotlive/)Stream live plots to a [Matplotlib](https://matplotlib.org/) figure.
## Example
```py
import math
import matplotliveplot = matplotlive.LivePlot(
timestep=0.01, # seconds
duration=1.0, # seconds
ylim=(-5.0, 5.0),
)for i in range(10_000):
plot.send("bar", math.sin(0.3 * i))
plot.send("foo", 3 * math.cos(0.2 * i))
plot.update()
```## Installation
### From conda-forge
```console
conda install -c conda-forge matplotlive
```### From PyPI
```console
pip install matplotlive
```## See also
- [Teleplot](https://github.com/nesnes/teleplot): alternative to plot telemetry data from a running program.