2
$\begingroup$

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.

$\endgroup$
2
  • 3
    $\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, 2019 at 16:35
  • 3
    $\begingroup$ @b2m2a1 That is probably worth an answer... $\endgroup$ May 20, 2019 at 18:23

1 Answer 1

1
$\begingroup$

Turning the comment to an answer. 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$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.