I’m plotting some numbers produced by my simulation using GLMakie. The code looks somewhat like this:
data = Observable([[0.0], [0.0]])
series(data)
while sim_is_running
# do stuff
push!(data[][1], result1)
push!(data[][2], result2)
notify(data)
end
This seems to work fine, however, the axis limits do not adjust when new points are added to the plot. I could add a listener to data
that manually calls autolimits!
, but that seems a bit wasteful (not least because it will add a second redraw unless I am missing something). Is there a better way to do this?