Skip to content

Commit 9f47c21

Browse files
committed
Added default behavior in case is None.
1 parent 4be681e commit 9f47c21

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

persim/visuals.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def bottleneck_matching(I1, I2, matchidx, D, labels=["dgm1", "dgm2"], ax=None):
195195
persim.bottleneck_matching(A_h1, B_h1, matchidx, D)
196196
197197
"""
198+
ax = ax or plt.gca()
198199

199200
plot_diagrams([I1, I2], labels=labels, ax=ax)
200201
cp = np.cos(np.pi / 4)
@@ -246,6 +247,7 @@ def wasserstein_matching(I1, I2, matchidx, palette=None, labels=["dgm1", "dgm2"]
246247
persim.wasserstein_matching(A_h1, B_h1, matchidx, D)
247248
248249
"""
250+
ax = ax or plt.gca()
249251

250252
cp = np.cos(np.pi / 4)
251253
sp = np.sin(np.pi / 4)

0 commit comments

Comments
 (0)