Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Jun 5, 2022
1 parent 3a34804 commit 19a6614
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions findpeaks/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@
# import matplotlib.pyplot as plt
# from findpeaks import findpeaks

# %% issue XXX
# %% issue in mail
# Import library
from findpeaks import findpeaks
# Initialize
fp = findpeaks(method='topology')
# Example 1d-vector
X = fp.import_example('1dpeaks')

# Fit topology method on the 1d-vector
results = fp.fit(X)
# Plot the results
fp.plot_persistence(fontsize_ax1=12, fontsize_ax2=14)


# %% issue in mail
import numpy as np
from findpeaks import findpeaks

Expand All @@ -35,7 +49,7 @@

# Plot topology
fp2.plot()
fp2.plot_persistence()
fp2.plot_persistence(fontsize_ax1=None)


# %% issue #12
Expand Down Expand Up @@ -146,7 +160,7 @@
fp = findpeaks(method="topology", verbose=verbose)
results = fp.fit(X)
fp.plot()
fp.plot_persistence()
fp.plot_persistence(fontsize_ax1=4)

fp = findpeaks(method="peakdetect", lookahead=15, verbose=verbose)
# Make fit
Expand Down

0 comments on commit 19a6614

Please sign in to comment.