Makie animations broken?

I was using a script to animate plots using Makie without any issue for a while, however now I am getting an error and I have no idea how to resolve it.

Here is an example script from an earlier post

using Makie
AbstractPlotting.inline!(true)

N = 1000
r = [(rand(5000, 2) .- 0.5) .* 25 for i = 1:N]
scene = scatter(r[1], markersize = 1, limits = FRect(-25/2, -25/2, 25, 25))
s = scene[end] # last plot in scene
record(scene, "output.mp4", r) do m
    s[1] = m
end

from

Now when I run this I get the following error, it seems like the formatting of scene has changed.

s = scene[end] # last plot in scene
ERROR: MethodError: no method matching lastindex(::AbstractPlotting.FigureAxisPlot)
Closest candidates are:
  lastindex(::Markdown.MD) at /build/julia/src/julia-1.5.3/usr/share/julia/stdlib/v1.5/Markdown/src/parse/parse.jl:26
  lastindex(::Figure, ::Any) at /home/tdross/.julia/packages/AbstractPlotting/ek9LT/src/figures.jl:92
  lastindex(::Cmd) at process.jl:638
  ...
Stacktrace:
 [1] top-level scope at REPL[10]:1
 [2] run_repl(::REPL.AbstractREPL, ::Any) at /build/julia/src/julia-1.5.3/usr/share/julia/stdlib/v1.5/REPL/src/REPL.jl:288

We don’t return Scene anymore from basic plotting commands ever since we have switched to using MakieLayout by default, see for example here Basic Tutorial · Makie Plotting Ecosystem or here Plot Method Signatures · Makie Plotting Ecosystem

1 Like

So the examples should be updated? E.g. here: Animation · Makie.jl

1 Like

They are. You are looking at old documentation (MakieGallery is deprecated).

The current one is here: Home

Link to the animations section: Animations

I know some packages have managed to add a floating banner in old documentation warning users and pointing them to the right one. I wonder if we can do that as well.

Ah thanks! Yes, a deprecation banner would be helpful

1 Like