Real-time live plot server using ZeroMQ and Gnuplot.
liveplots serves a minimalistic plotting API over ZeroMQ.
Plot commands are sent fire-and-forget via PUSH/PULL sockets — the calling
process is never blocked waiting for a response.
Plots are generated by Gnuplot.
The purpose of this package is to monitor long-running computations without interfering with them (i.e. slowing them down).
Multiple plot servers can be started, each on its own daemon process.
- Python 3.12+
- Gnuplot (install via
apt install gnuploton Debian/Ubuntu,brew install gnuploton macOS)
uv add liveplotsOr with pip:
pip install liveplotsfrom numpy import random
from liveplots import PlotServer
pserver = PlotServer(port=0, persist=1)
data = random.normal(0, 1, 1000).tolist()
data2 = random.normal(4, 1, 1000).tolist()
pserver.lines([data, data2], [], ["data", "data2"], "Two plots")
pserver.flush_queue()More examples in the examples/ directory.
| Lines | Scatter | Histogram |
|---|---|---|
![]() |
![]() |
![]() |
| Error Bars | Filled Curves | Boxplot |
|---|---|---|
![]() |
![]() |
![]() |
| Heatmap | Multiplot |
|---|---|
![]() |
![]() |
The package also includes a cross-platform file system monitor based on watchdog:
from liveplots import Monitor
def action(fpath):
print(f"File changed: {fpath}")
monitor = Monitor("/tmp", ["create", "modify"], action)GPL-3.0-or-later







