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.2.3.post1.tar.gz (11.0 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.2.3.post1-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file pmecg-0.2.3.post1.tar.gz.

File metadata

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

File hashes

Hashes for pmecg-0.2.3.post1.tar.gz
Algorithm Hash digest
SHA256 8867d660e45f991b038c236616f42944160fb621f6c84cfccad686cf46253917
MD5 0f3720df374cbed693e4ae704a56dea2
BLAKE2b-256 b98b5ba0be1137689d5efea679bc048e0891b59a6b3b56665b210f9937af905e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmecg-0.2.3.post1.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.2.3.post1-py3-none-any.whl.

File metadata

  • Download URL: pmecg-0.2.3.post1-py3-none-any.whl
  • Upload date:
  • Size: 39.2 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.2.3.post1-py3-none-any.whl
Algorithm Hash digest
SHA256 771cb03f42e78a8f9d372985449bbd7b37207acdec6a3d2663229e2391af3340
MD5 6c85580a6bf1a475e6488f09d3c6a250
BLAKE2b-256 a5b45fdea6eb39928301b460c4f3c97530c10c8a53cf7ccfea80de756d07902d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pmecg-0.2.3.post1-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