diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 0617fc7681bd..9df73aa9902f 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -3073,7 +3073,7 @@ def draw(self, renderer): if not self.figure.canvas.is_saving(): artists = [ a for a in artists - if not a.get_animated() or isinstance(a, mimage.AxesImage)] + if not a.get_animated()] artists = sorted(artists, key=attrgetter('zorder')) # rasterize artists with negative zorder diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index c5044fe7242f..e0e8a3260785 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -2438,10 +2438,11 @@ def matshow(A: ArrayLike, fignum: None | int = None, **kwargs) -> AxesImage: """ Display an array as a matrix in a new figure window. - The origin is set at the upper left hand corner and rows (first - dimension of the array) are displayed horizontally. The aspect - ratio of the figure window is that of the array, unless this would - make an excessively short or narrow figure. + The origin is set at the upper left hand corner. + The first dimension of the array represents the length of the vertical column + the second dimension of the array represents the length of the + horizontal column. The aspect ratio of the figure window is that of the array, + unless this would make an excessively short or narrow figure. Tick labels for the xaxis are placed on top. diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 8c43b04e0eb7..394359d1b6ce 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -8914,3 +8914,10 @@ def test_axhvlinespan_interpolation(): ax.axhline(1, c="C0", alpha=.5) ax.axhspan(.8, .9, fc="C1", alpha=.5) ax.axhspan(.6, .7, .8, .9, fc="C2", alpha=.5) + + +@check_figures_equal(extensions=["png"]) +def test_anim_without_image(fig_test, fig_ref): + ax_ref = fig_ref.subplots() + imdata = np.random.random((20, 20)) + ax_ref.plot(imdata, animated=True)