-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DimensionMismatch error with an animation for the size changing array with Observable #2441
Comments
In your first example, you create one If you want to use two using GLMakie
function plot_graph_realtime(x)
fig=Figure()
ax=Axis(fig[1,1])
it=Observable(1)
obs_x1 = Observable(x[1,1:it[]])
obs_x2 = Observable(x[2,1:it[]])
on(it) do _it
# using .val to change the value will not propagate an update
obs_x1.val = x[1,1:_it]
# using [] will trigger an update
obs_x2[] = x[2,1:_it]
end
lines!(ax,obs_x1, obs_x2)
xlims!(ax,-1,3)
ylims!(ax,-1,3)
display(fig)
for i=1:size(x,2)
sleep(1)
it[]=i
end
end
plot_graph_realtime([0 1 2 3;0 1 2 3]) |
Thanks a lot! |
see also #3658 |
I am trying to make an animation with size changing array with Observable like
The above code does work. But the similar code like
does not work with the following error
Do you have any idea for the reason with the error?
The text was updated successfully, but these errors were encountered: