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.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-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pmecg-0.2.3.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.tar.gz
Algorithm Hash digest
SHA256 5f40e49d4e1b9fb9d6c5d34bb99da3e900714fb0e8344825fb90c009103830f5
MD5 06c3cc06e2d6ddf5f9976b6fb5d5588e
BLAKE2b-256 a1a196a1b0c96d5100869ccdc536eaa157c3c13489a4b80ffa4a973684946fd6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: pmecg-0.2.3-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-py3-none-any.whl
Algorithm Hash digest
SHA256 a6235ad952af68d62041128f8a107581522175dfe0428d5d0ed4d0022fb906ee
MD5 0e8f86e1d6eaf4413bff9103a4e178e3
BLAKE2b-256 087988730306033ac82d00ee104a7a29623a5b3e392ca1c3862e23e40b075877

See more details on using hashes here.

Provenance

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