# Fast animations

**URL:** <https://discourse.julialang.org/t/fast-animations/134427>\
**Category:** New to Julia\
**Tags:** animations\
**Created:** [December 8, 2025, 6:34am UTC](https://discourse.julialang.org/t/fast-animations/134427 "2025-12-08T06:34:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahmah](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mahmah/32/214326_2.png) [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Post date:** [December 8, 2025, 6:34am UTC](https://discourse.julialang.org/t/fast-animations/134427/1 "2025-12-08T06:34:01Z")

</div>

Hi, what would be the fastest way to generate animations or videos? I’ve been able to make animated gifs with @animateanimate but they take quite some time. Here’s the kind of stuff I’m doing:

```julia-auto
data = Matrix(m.data)
X = data[:,1:3:end]
Y = data[:,2:3:end]
Z = data[:,3:3:end]
anim = @animate for i in 1:m.nframes
    Plots.scatter(X[i,:],Y[i,:],Z[i,:],
        legend=false,
        xlim=extrema(filter(!isnan,X)),
        ylim=extrema(filter(!isnan,Y)),
        zlim=extrema(filter(!isnan,Z)))
end
gif(anim,fps=60)

```

Output doesn’t need to be .gif, it can be .mov for instance. Thanks for your help! 🙂

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [December 8, 2025, 7:59am UTC](https://discourse.julialang.org/t/fast-animations/134427/2 "2025-12-08T07:59:20Z")

</div>

I would try Makie.jl?

---

<div class="post-metadata">

**Author:** ![J.B](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j.b/32/219271_2.png) [@J.B](https://discourse.julialang.org/u/J.B)\
**Post date:** [December 8, 2025, 1:14pm UTC](https://discourse.julialang.org/t/fast-animations/134427/3 "2025-12-08T13:14:06Z")

</div>

For your case I’d second @gdalle and say Makie’s [record-function](https://docs.makie.org/stable/explanations/animation#Animating-a-plot-%22live%22) is the way to go.

If you don’t want to switch to Makie.jl, you could export images of your Plots.jl plots via `savefig` and use VideoIO.jl to generate a video out of the image seqence like so:

```julia-auto
VideoIO.save(filename::String, imgstack::Array)

```

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [December 8, 2025, 4:27pm UTC](https://discourse.julialang.org/t/fast-animations/134427/4 "2025-12-08T16:27:58Z")

</div>

> [@mahmah](#):
>
> `gif(anim,fps=60)`

Do you need this high framerate?

---

<div class="post-metadata">

**Author:** ![keithjlee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keithjlee/32/19469_2.png) [@keithjlee](https://discourse.julialang.org/u/keithjlee)\
**Post date:** [December 8, 2025, 6:41pm UTC](https://discourse.julialang.org/t/fast-animations/134427/5 "2025-12-08T18:41:20Z")

</div>

Makie is well suited for animations using their Observable system:

```julia-auto
using GLMakie

nframes = 300
data = rand(1000, nframes)

X = data[:,1:3:end]
Y = data[:,2:3:end]
Z = data[:,3:3:end]

frame = Observable(1)
point = @lift(Point3.(X[$frame, :], Y[$frame, :], Z[$frame, :]))

fig = Figure()
ax = Axis(
    fig[1,1]
)

scatter!(point)
fig

record(fig, "animation.gif", 1:nframes; framerate = 20) do iteration
    frame[] = iteration
end

```

Gives:  
 ![animation](https://global.discourse-cdn.com/julialang/original/3X/f/8/f8563dcd96bb4c6c04c4c2ad0976c03e88e2dc6c.gif)
