Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8e2fe9b

Browse filesBrowse files
authored
Merge pull request #16446 from anntzer/macho
TST: Replace matshow baseline test by check_figures_equal.
2 parents af2bc5e + f5afbdf commit 8e2fe9b
Copy full SHA for 8e2fe9b

File tree

Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-6
lines changed
Binary file not shown.

‎lib/matplotlib/tests/test_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_axes.py
+8-6Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,15 @@ def test_spy_invalid_kwargs():
147147
ax.spy(np.eye(3, 3), **unsupported_kw)
148148

149149

150-
@image_comparison(['matshow.png'], style='mpl20')
151-
def test_matshow():
152-
np.random.seed(19680801)
150+
@check_figures_equal(extensions=["png"])
151+
def test_matshow(fig_test, fig_ref):
152+
mpl.style.use("mpl20")
153153
a = np.random.rand(32, 32)
154-
155-
fig, ax = plt.subplots()
156-
ax.matshow(a)
154+
fig_test.add_subplot().matshow(a)
155+
ax_ref = fig_ref.add_subplot()
156+
ax_ref.imshow(a)
157+
ax_ref.xaxis.tick_top()
158+
ax_ref.xaxis.set_ticks_position('both')
157159

158160

159161
@image_comparison(['formatter_ticker_001',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.