Skip to content

shujuecn/wfdb-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The WFDB Python Package

signals

Introduction

The WFDB Python package is a Python-native tool for reading, writing, processing, and plotting physiological signal and annotation data. This package is forked from MIT-LCP/wfdb-python.

Enhancements

The plotting functions have been extended to include options for:

  • Hiding axes
  • Customizing line styles
  • Changing background colors

These features allow users to create "clean" ECG plots.

Example Usage

See the demo.ipynb notebook for example use cases.

# Read WFDB record
rec_path = "./sample-data/s40000306/40000306"
rd_record = wfdb.rdrecord(rec_path)

# Plot with custom styles
wfdb.plot_wfdb(
    record=rd_record,
    time_units="samples",
    figsize=(20, 15),
    ecg_grids="",      # Remove grid
    title=" ",         # Empty title
    close_axis=True,   # Hide axis
    line_color="w",    # White lines
    bg_color="k",      # Black background
)

This will generate a clean ECG plot, as shown below:

About

Native Python WFDB package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 81.0%
  • Python 19.0%