Skip to main content

Plot ECGs on a paper-like support. Flexible to variable configurations.

Project description

pmecg logo

pmecg — Plot My ECG

PyPI License: GPL v3 Python

pmecg is a Python library for plotting ECG signals on a paper-like support, with flexible lead configurations, time scales, and attention map overlays.

1×3 layout 4×3 layout
1x3 ECG 4x3 ECG
Interval attention Line-color attention Background attention
Interval attention ECG Line-color attention ECG Background attention ECG

Installation

pip install pmecg

Quick start

import numpy as np
import pandas as pd
import pmecg

fs = 500
t = np.linspace(0, 10, int(fs * 10))
df = pd.DataFrame({name: np.random.randn(len(t)) * 0.1 for name in pmecg.SUPPORTED_LEADS})

plotter = pmecg.ECGPlotter()
configuration = pmecg.template_factory("4x3", df, leads_map=None)
fig = plotter.plot(df, configuration=configuration, sampling_frequency=fs)
fig.savefig("ecg.png", dpi=300, bbox_inches="tight")

For full documentation, visit pmecg.readthedocs.io.

License

Copyright (C) 2026 Fabio Bonassi — GNU General Public License v3

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

pmecg-0.3.0.tar.gz (21.8 MB view details)

Uploaded Source

Built Distribution

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

pmecg-0.3.0-py3-none-any.whl (47.8 kB view details)

Uploaded Python 3

File details

Details for the file pmecg-0.3.0.tar.gz.

File metadata

  • Download URL: pmecg-0.3.0.tar.gz
  • Upload date:
  • Size: 21.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pmecg-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3636b24b790af3d8d3c9f18ae3cd22c0aa2b9f3c106b25eb7dcdc76bc09b512e
MD5 40a2b6f17d107ee511b9516c8aa6b853
BLAKE2b-256 fda661ae47b9cbd2fc51b127f4f781cee053d188e84eb036c80d14fa6fb6fa49

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmecg-0.3.0.tar.gz:

Publisher: release.yml on bonassifabio/pmecg

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

File details

Details for the file pmecg-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pmecg-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 47.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pmecg-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 088b2bf372d20d82abae7f935df7d7afd15c60be414ba8f768c2a89b87b2350d
MD5 05dfae49c29a80538fb693514c8612c5
BLAKE2b-256 50ea2732d5db12bc9a3bfc53b3d4a0f8fa203c684d989058aac4d1a968291ea0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmecg-0.3.0-py3-none-any.whl:

Publisher: release.yml on bonassifabio/pmecg

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