Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 7 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)