I think the current answer just creates a GIF but doesn't explain why LocalizeVariables -> False would cause an abnormal GIF to be exported. And I don't see any explanation about this phenomenon in the documentation. I don't sure this is a bug or not. So I hope to reopen this post.


g1 = Manipulate[Plot[{Log[x], (x^(1-a)-1)/(1-a)}, {x, 0, 5}, PlotLegends->"Expressions"], 
{a, 0, 0.99}, LocalizeVariables->False];


Output (GIF):

enter image description here

As you can see, the .gif is just a static image. Any ideas?


But this code worked perfectly fine:

a1 = Manipulate[Plot[{(1-t)*x - t*((E^(-t*x)) - 1)}, {x, -100, 100}], {t, 0, 1}]

Export["graph.gif", a1]


enter image description here

  • $\begingroup$ How to export without the nasty panel and controls $\endgroup$
    – user5601
    Jan 19, 2022 at 17:43

1 Answer 1


That's because when exporting to a gif, it actually takes a list of images. So what you actually want is

g1 = Table[
      Plot[{Log[x], (x^(1 - a) - 1)/(1 - a)}, {x, 0, 5}, PlotLegends -> "Expressions"],
      {a, 0, 0.99, .99/100}
  • 1
    $\begingroup$ Makes sense! I've edited my question - do you know why the code snippet below worked? (I've already accepted your answer even if you don't know). $\endgroup$
    – Thev
    Oct 20, 2018 at 20:09
  • $\begingroup$ You do output the animation, but you don't explain why the op's code doesn't output the animation. I don't see anything official stating that LocalizeVariables prevents outputting animations $\endgroup$
    – yode
    Jan 18, 2022 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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