Closed avdbspecific closed 5 years ago
Thanks for this code, it's been useful so far !
I discovered a small issue in the _plot() method. When specifying an ax object only the first reference would be plot.
The issue can be replicated as: fig, ax = plt.subplots(ncols=3,nrows=3,figsize=(16,12)) ind1 = detectPeaks.detectPeaks(a1, show=True, ax=ax[2,0], threshold=0, kpsh=True, mpd=2, mph=5e-2) ind2 = detectPeaks.detectPeaks(a2, show=True, ax=ax[2,1], threshold=0, kpsh=True, mpd=2, mph=5e-2)
The workaround is easy: if ax is None: _, ax = plt.subplots(1, 1, figsize=(8, 4)) noAx = True else: noAx = False (...)
if noAx: plt.show()
corrected. thank you.
Thanks for this code, it's been useful so far !
I discovered a small issue in the _plot() method. When specifying an ax object only the first reference would be plot.
The issue can be replicated as: fig, ax = plt.subplots(ncols=3,nrows=3,figsize=(16,12)) ind1 = detectPeaks.detectPeaks(a1, show=True, ax=ax[2,0], threshold=0, kpsh=True, mpd=2, mph=5e-2) ind2 = detectPeaks.detectPeaks(a2, show=True, ax=ax[2,1], threshold=0, kpsh=True, mpd=2, mph=5e-2)
The workaround is easy: if ax is None: _, ax = plt.subplots(1, 1, figsize=(8, 4)) noAx = True else: noAx = False (...)
if noAx: plt.show()