Plot can't take Observables

Oh, oops, just a transpose

using GLMakie

x =  [[[4, 3], [-4, -3], [-0.75, 2]], [[5, 4], [-7, 8], [2, 2]], [[5, 7], [-2, 1], [9, 10]]]
pts = [Point2f.(l) for l in x]
pts = reduce((a,b)->cat(a, b; dims=2), pts)

idx = Observable(1)
obs = [map(i->pts[j, 1:i], idx) for j in 1:size(pts, 1)]

f = Figure()
ax = Axis(f[1,1])
limits!(-10, 10, -10, 10)

lines!.(ax, obs)

for i in 1:3
    idx[] = i
    sleep(1)
end
2 Likes