Skip to content

Commit 4be681e

Browse files
committed
Made arg for plot functions actually be used.
1 parent fe5af88 commit 4be681e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

persim/visuals.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ def bottleneck_matching(I1, I2, matchidx, D, labels=["dgm1", "dgm2"], ax=None):
217217
elif j >= I2.shape[0]:
218218
diagElem = np.array([I1Rot[i, 0], 0])
219219
diagElem = diagElem.dot(R.T)
220-
plt.plot([I1[i, 0], diagElem[0]], [I1[i, 1], diagElem[1]], "g")
220+
ax.plot([I1[i, 0], diagElem[0]], [I1[i, 1], diagElem[1]], "g")
221221
else:
222-
plt.plot([I1[i, 0], I2[j, 0]], [I1[i, 1], I2[j, 1]], "g")
222+
ax.plot([I1[i, 0], I2[j, 0]], [I1[i, 1], I2[j, 1]], "g")
223223

224224

225225
def wasserstein_matching(I1, I2, matchidx, palette=None, labels=["dgm1", "dgm2"], colors=None, ax=None):
@@ -267,8 +267,8 @@ def wasserstein_matching(I1, I2, matchidx, palette=None, labels=["dgm1", "dgm2"]
267267
elif j >= I2.shape[0]:
268268
diagElem = np.array([I1Rot[i, 0], 0])
269269
diagElem = diagElem.dot(R.T)
270-
plt.plot([I1[i, 0], diagElem[0]], [I1[i, 1], diagElem[1]], "g")
270+
ax.plot([I1[i, 0], diagElem[0]], [I1[i, 1], diagElem[1]], "g")
271271
else:
272-
plt.plot([I1[i, 0], I2[j, 0]], [I1[i, 1], I2[j, 1]], "g")
272+
ax.plot([I1[i, 0], I2[j, 0]], [I1[i, 1], I2[j, 1]], "g")
273273

274274
plot_diagrams([I1, I2], labels=labels, ax=ax)

0 commit comments

Comments
 (0)