Closed afonsof3rreira closed 2 years ago
Thank you very much for your PR @afonsof3rreira ! I'd like to ask you a few things:
Update BioSPPy/biosppy/__init__.py
to lazy load the inter_plotting
module;
Update BioSPPy/biosppy/inter_plotting/__init__.py
to lazy load its components;
Maybe try to make the plot_ecg
method easier to use, i.e., requiring less arguments. Perhaps this could be accomplished by applying signals.ecg
methods during inter_plotting.ecg.plot_ecg
. Ideally, the required parameters should be similar to the signals.ecg.ecg
, requiring only the following:
ecg(signal, sampling_rate, path, show)
Provide an example on how to use the inter_plotting.ecg.plot_ecg
method.
Lazy loading was updated. A 'example.py' was added similarly to the code on the readme file. The new method is called by signals.ecg, when the new arg interactive
is True. Otherwise, previous code is run. When the path is provided, in this mode, two images are saved seperately, one for each block.
Edit: Added an interactive mode for ACC signals
It would be a nice addition if the plotting functions could handle interactive items, so an interactive option was created for the ECG signal plotting function, which includes 2 toolbars located at the bottom, controlling the left and the right plots independently.