Skip to content Skip to sidebar Skip to footer

Wfdb Plot Not Working With Code From Documentation

I am starting an appplication with WFDB, (I'm new to the library) and it is giving me error messages with code I got straight from the documentation. import wfdb record = wfdb.rdsa

Solution 1:

https://github.com/MIT-LCP/wfdb-python Fixes these issues, took me hours to find the answer to this problem.


Solution 2:

It is in demo #6 in https://github.com/MIT-LCP/wfdb-python/blob/master/demo.ipynb.

I tried and it works very well.

# import library
import wfdb
# assign signals as ECG array from 0 to 1500 as your expected range, fields as other information
signals, fields = wfdb.rdsamp(r"C:\folder\MIT\100", sampto=1500)
# Plot with the array signals, fs as frequency (can be founds in fields['fs'], and title as an optional
wfdb.plot_items(signal=signals, fs=fields['fs'], title='Huy Test')
# Display it with the additional information
display((signals, fields))

enter image description here


Post a Comment for "Wfdb Plot Not Working With Code From Documentation"