Skip to content

Commit

Permalink
MAINT: fix origin='image' calls that Matplotlib no longer supports
Browse files Browse the repository at this point in the history
Closes PyWaveletsgh-595

[ci skip]
  • Loading branch information
rgommers committed Nov 6, 2021
1 parent 300ddd9 commit 95f27db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/swt2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
fig = plt.figure()
for i, a in enumerate([LL, LH, HL, HH]):
ax = fig.add_subplot(2, 2, i + 1)
ax.imshow(a, origin='image', interpolation="nearest", cmap=plt.cm.gray)
ax.imshow(a, origin='upper', interpolation="nearest", cmap=plt.cm.gray)
ax.set_title(titles[i], fontsize=12)

fig.suptitle("SWT2 coefficients, level %s" % level, fontsize=14)
Expand Down
6 changes: 3 additions & 3 deletions demo/wp_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
fig = plt.figure()
for i, p2 in enumerate(path):
ax = fig.add_subplot(2, 2, i + 1)
ax.imshow(np.sqrt(np.abs(wp2[p2].data)), origin='image',
ax.imshow(np.sqrt(np.abs(wp2[p2].data)), origin='upper',
interpolation="nearest", cmap=plt.cm.gray)
ax.set_title(p2)

Expand All @@ -31,7 +31,7 @@
for i, p2 in enumerate(path):
ax = fig.add_subplot(2, 2, i + 1)
p1p2 = p1 + p2
ax.imshow(np.sqrt(np.abs(wp2[p1p2].data)), origin='image',
ax.imshow(np.sqrt(np.abs(wp2[p1p2].data)), origin='upper',
interpolation="nearest", cmap=plt.cm.gray)
ax.set_title(p1p2)

Expand All @@ -42,7 +42,7 @@
ax = fig.add_subplot(len(row), len(row), i)
ax.set_title("%s=(%s row, %s col)" % (
(node.path,) + wp2.expand_2d_path(node.path)))
ax.imshow(np.sqrt(np.abs(node.data)), origin='image',
ax.imshow(np.sqrt(np.abs(node.data)), origin='upper',
interpolation="nearest", cmap=plt.cm.gray)
i += 1

Expand Down

0 comments on commit 95f27db

Please sign in to comment.