Skip to main content

Real-time live plot server using ZeroMQ and Gnuplot

Project description

liveplots

CI PyPI Python License Ruff Code style: Ruff

Real-time live plot server using ZeroMQ and Gnuplot.

Description

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.

Requirements

  • Python 3.12+
  • Gnuplot (install via apt install gnuplot on Debian/Ubuntu, brew install gnuplot on macOS)

Installation

uv add liveplots

Or with pip:

pip install liveplots

Quick Start

from 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.

File System Monitor

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)

License

GPL-3.0-or-later

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liveplots-2.0.0.tar.gz (79.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liveplots-2.0.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file liveplots-2.0.0.tar.gz.

File metadata

  • Download URL: liveplots-2.0.0.tar.gz
  • Upload date:
  • Size: 79.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for liveplots-2.0.0.tar.gz
Algorithm Hash digest
SHA256 032044891416deabe1e85f6d23800b8c42cfa1e41388ff22a8a75af301cb288d
MD5 c12d7a8b21b23abc2ac8dd0867fbd193
BLAKE2b-256 14b47fcbbe967a1283d60d2bc766870b9f09dab88d89a30cce5fb35624f6f5c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for liveplots-2.0.0.tar.gz:

Publisher: publish.yml on fccoelho/liveplots

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file liveplots-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: liveplots-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for liveplots-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f98f48c62c39be67d7d54aa30a5d502c672d73ae4e67c65f838798d264f94fd3
MD5 ddf017959db299b1c72145be7b6d5bef
BLAKE2b-256 2e41ede8364347f64c73abd39e849583b5c49d8fb38b5d60c529cb83c68c5d8f

See more details on using hashes here.

Provenance

The following attestation bundles were made for liveplots-2.0.0-py3-none-any.whl:

Publisher: publish.yml on fccoelho/liveplots

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page