Makie adjust scene limits + scale

I want to animate a sequence of lines, where the x values of each line are fixed, but the y values vary in scale. Something like this:

julia> using Makie

julia> scene = Scene(); y = Node(randn(10)); lines!(scene, y)

julia> for i in 1:20; sleep(0.1); push!(y, i*randn(10)); end

My problem is that the scene limits and aspect ratio are not reasonable for the later iterations.
I can update the limits with update_limits!, but then the aspect ratio is still bad. What is the right way to do this?

Interesting. I would have suggested doing that through lines attribute limit, however, that does not accept Observable. Probably you need to find a way to redraw the axis in each iteration after executing update_limits!.

1 Like

A related question is there a way to just clear the whole scene?