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.

Plot Gallery

Lines Scatter Histogram
Lines Scatter Histogram
Error Bars Filled Curves Boxplot
Error Bars Filled Curves Boxplot
Heatmap Multiplot
Heatmap Multiplot

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.1.tar.gz (379.1 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.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: liveplots-2.0.1.tar.gz
  • Upload date:
  • Size: 379.1 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.1.tar.gz
Algorithm Hash digest
SHA256 45054ba0f586a7d5343975ab7796acd3678ca94bb5e433342e75ce0e356179f4
MD5 2e89aee33f818e7bf9821a194767b2c1
BLAKE2b-256 94085f151d72e5b19bccf4949a2660dc34e9637757a58be9ceeaa3d391c8ceea

See more details on using hashes here.

Provenance

The following attestation bundles were made for liveplots-2.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: liveplots-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf66f9c50c920758d97dfb9acfa70f498940d24837268f8254b991a8718e09c
MD5 c6cc26788b2648bf158baa1752eade3d
BLAKE2b-256 20b52b7298a7a4a53a9d929102915c4b08150c0260d70c4df635b11b2e369335

See more details on using hashes here.

Provenance

The following attestation bundles were made for liveplots-2.0.1-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