🌐 AI搜索 & 代理 主页
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 @@ -3123,7 +3123,7 @@ def draw(self, renderer):
if not self.get_figure(root=True).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
5 changes: 5 additions & 0 deletions lib/matplotlib/tests/test_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -9003,6 +9003,11 @@ def test_zorder_and_explicit_rasterization():
with io.BytesIO() as b:
fig.savefig(b, format='pdf')

@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))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
imdata = np.random.random((20,20))
imdata = np.random.random((20, 20))

ax_ref.plot(imdata, animated=true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ax_ref.plot(imdata, animated=true)
ax_ref.plot(imdata, animated=True)


@image_comparison(["preset_clip_paths.png"], remove_text=True, style="mpl20",
tol=0.027 if platform.machine() == "arm64" else 0)
Expand Down