diff --git a/lib/matplotlib/tests/baseline_images/test_axes/matshow.png b/lib/matplotlib/tests/baseline_images/test_axes/matshow.png deleted file mode 100644 index 66970b335aed..000000000000 Binary files a/lib/matplotlib/tests/baseline_images/test_axes/matshow.png and /dev/null differ diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 8e8729751290..a205dc527bee 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -144,13 +144,15 @@ def test_spy_invalid_kwargs(): ax.spy(np.eye(3, 3), **unsupported_kw) -@image_comparison(['matshow.png'], style='mpl20') -def test_matshow(): - np.random.seed(19680801) +@check_figures_equal(extensions=["png"]) +def test_matshow(fig_test, fig_ref): + mpl.style.use("mpl20") a = np.random.rand(32, 32) - - fig, ax = plt.subplots() - ax.matshow(a) + fig_test.add_subplot().matshow(a) + ax_ref = fig_ref.add_subplot() + ax_ref.imshow(a) + ax_ref.xaxis.tick_top() + ax_ref.xaxis.set_ticks_position('both') @image_comparison(['formatter_ticker_001',