Skip to content

Commit 04a4fb1

Browse files
committed
update examples
1 parent 66e3dd0 commit 04a4fb1

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

findpeaks/examples.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
# peak = result_df.index[result_df['peak']==True].tolist()
196196

197197
fp.plot_persistence()
198+
fp.plot(figsize=(25, 14), text=True, marker='x', color='#ff0000', figure_order='vertical', fontsize=14)
198199
fp.plot(figsize=(25, 14), text=False, marker='x', color='#ff0000', figure_order='vertical', fontsize=14)
199200
# fp.plot_mesh(view=(40, 180))
200201
# fp.plot_mesh(view=(90, 0))
@@ -623,23 +624,24 @@
623624
# 2dpeaks example
624625
fp = findpeaks(method='topology')
625626
img = fp.import_example('2dpeaks')
626-
fp.fit(img)
627-
fp.plot(cmap='hot')
628-
fp.plot()
627+
results = fp.fit(img)
628+
ax = fp.plot(cmap='hot', figure_order='horizontal')
629+
fp.plot(figure_order='horizontal')
629630
fp.plot_persistence()
630631

631632
fp = findpeaks(method='mask', verbose='info')
632633
img = fp.import_example()
633634
fp.fit(img)
634-
fp.plot()
635+
ax = fp.plot(figure_order='horizontal', fontsize=20, marker='x', s=14)
636+
ax = fp.plot(figure_order='horizontal', fontsize=20)
635637

636638

637639
# 2dpeaks example with other settings
638-
fp = findpeaks(method='topology', imsize=(300, 300), scale=True, togray=True, denoise='fastnl', params={'window': 31},
639-
verbose='info')
640+
fp = findpeaks(method='topology', scale=True, togray=True, denoise='fastnl', params={'window': 31}, verbose='info')
640641
img = fp.import_example('2dpeaks')
641-
fp.fit(img)
642-
fp.plot()
642+
results = fp.fit(img)
643+
ax = fp.plot(figure_order='horizontal', fontsize=10)
644+
ax = fp.plot_persistence(marker='x', s=100)
643645

644646
# %%
645647
from findpeaks import findpeaks

0 commit comments

Comments
 (0)