Animation from data points (arrays)

Here’s one bare-bones version to get you started with Makie.jl:

using Makie
using AbstractPlotting: px

npoints = 50
original_points = rand(Point3f0, npoints) .* 50
points = Node(original_points)
nframes = 100
displacements = rand(Point3f0, npoints, nframes)

scene = scatter(points, markersize = 10px, resolution = (500, 500), scale = false)
linesegments!(scene, points)

record(scene, "test.gif", 1:nframes, framerate = 20) do i
    # update points observable, scatter and linesegments automatically update
    points[] = original_points .+ displacements[:, i]
end

test

4 Likes