From 9e71fc30fbbffb0219d30f65fef31063c94ed2bd Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Mon, 19 Sep 2022 14:13:37 +0200 Subject: [PATCH] DOC: Make animation continuous This changes the phase such that the start and end images are the same. This is a bit nicer for the animation thumbnails https://matplotlib.org/devdocs/gallery/index.html#animation. They are shown in an endless loop and if start and end images are different, we get a discontiguous jump when the animation is repeated. With this changes, the animation flow is contiguous. --- examples/animation/dynamic_image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/animation/dynamic_image.py b/examples/animation/dynamic_image.py index 5543da039639..cbec62607b2c 100644 --- a/examples/animation/dynamic_image.py +++ b/examples/animation/dynamic_image.py @@ -23,8 +23,8 @@ def f(x, y): # each frame ims = [] for i in range(60): - x += np.pi / 15. - y += np.pi / 20. + x += np.pi / 15 + y += np.pi / 30 im = ax.imshow(f(x, y), animated=True) if i == 0: ax.imshow(f(x, y)) # show an initial one first