I'm trying to export a gif from a list of images

The AnimationRepetitions command works, but the AnimationDirection does not. It just goes one way. Is there a way to loop back and forth?

Here's some example code:

list = Table[Plot[Exp[-A*x^2], {x, -10, 10}, PlotRange -> All], {A, .01, 1, .0495}];

Export["data.gif", list, AnimationRepetitions -> Infinity,AnimationDirection -> ForwardBackward]

It only goes forward.

Is there a way to animate this forward and backward without invoking Animate? I'd like to keep the frame out of the way.

  • 2
    $\begingroup$ You can use Animate but also include "ControlAppearance" -> None as an Export option which will hide the controls. E.g.: Export["~/Desktop/data.gif", ListAnimate[list, AnimationDirection -> ForwardBackward], AnimationRepetitions -> Infinity, "ControlAppearance" -> None] $\endgroup$ – b3m2a1 May 20 '19 at 16:35
  • 2
    $\begingroup$ @b2m2a1 That is probably worth an answer... $\endgroup$ – Henrik Schumacher May 20 '19 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.