13

I have a ".gif" figure exported from the following codes. 6 separated figures (frames) constitute a ".gif" figure. But the default time interval between each frame is less than 1 second. I hope to increase the time interval to 3 seconds, so the speed can be lower. Any one can help me? Thank you all in advance!

g1[a_, b_] := Graphics[{Red, Disk[{a, 0}, 1], Green, Disk[{1, 1}, 1], Blue, Disk[{b, 2}, 1]}];
f1 = Table[Show[g1[a, b] , PlotRange -> {{-2, 12}, {-2, 4}}  ], {a, 1, 8, 4}, {b, 0, 10, 5}];
f1 = Flatten[f1]
Export["f1.gif", f1]

enter image description here

enter image description here

m_goldberg
  • 107,779
  • 16
  • 103
  • 257
user14634
  • 771
  • 6
  • 17

1 Answers1

18

Although this is an old question, I'll post an answer:

The delay between frames (in seconds) can be controlled with the option "DisplayDurations". If it's a single number, then that's the delay between all the frames of the exported gif animation.

Another thing you can do is to provide a List as follows:

Export["f2.gif", f1, "DisplayDurations" -> {.1, 1}]

(* ==> "f2.gif" *)

gif

Here you see a fast-slow step combination because the list of durations {.1, 1} is repeated cyclically for successive frames.

Jens
  • 97,245
  • 7
  • 213
  • 499