Julia GLMakie plotting "contour" animation, old frames stay

Trying to use the GLMakie.record() function to make an animation of GLMakie.contour!() 3D contour plots. The code is quite classic. I will just list out the structure of it.
@lift GLMakie.contour!(ax, xx.val, yy.val, zz, wArr1)
where xx, yy, and wArr1 are changing with time steps. So they are set as Observables.
At the end, I did:
frames = 2:length(times)
save_fname = “./lag_20220802v8.mp4”
GLMakie.record(fig, save_fname, frames, framerate=8) do i
msg = string("Plotting frame ", i, " of “, frames[end])
print(msg * " \r”)
n = i

However, the animation does NOT show the contour plot at all. Then I went back and check each frame by updating the Observable time step, frame by frame. I found the latest contour plot still keeps the old contour plots in it. Can anyone give some advice on what might be happening?

Screenshot from 2022-08-04 09-19-33

1 Like

Your code example is very hard to read, you should try to format it and use the ```julia block.

One problem is @lift GLMakie.contour!(ax, xx.val, yy.val, zz, wArr1)
Not sure where you got that from, but that’s not how you use @lift.
I suggest reading the animation docs and/or the @lift docs (in the repl press ?@lift)…

1 Like