This is a simple code to generate image and pdf for ecg or any signal using python matplotlib. Example datafile are available in data directory
python app.py
curl 'http://localhost:8080/app/ecg'
Please refer requirements.txt for appropriate version of modules. This code is version dependent. Tested on Python 3.7.1 (Windows)