MakieOrg / Makie.jl

Interactive data visualizations and plotting in Julia
https://docs.makie.org/stable
MIT License
2.41k stars 311 forks source link

Contours + Observable often disappear and leave blank axis (WebGL) #3789

Open aplavin opened 6 months ago

aplavin commented 6 months ago

When using an observable in contour, and updating the observable, the plotted contours often (not always) disappear – leaving a blank axis.

MWE short script:

using WGLMakie

fig = Figure()

shiftobs = Observable((0., 0.))
data0 = rand(100, 100)
data = @lift circshift(data0, round.(Int, $shiftobs))

contour(fig[1,1], data)

display(fig)

for i in 1:10
    shiftobs[] = (i, i)
    sleep(0.2)
end

Video recording of me running this script twice. First run goes fine for a few iterations and then blanks, second run it blanks almost immediately:

https://github.com/MakieOrg/Makie.jl/assets/687995/6464019d-54a4-4af6-be86-b7188d7183f4

The exact same code works using GLMakie instead of WGL.

ffreyer commented 2 months ago

Can't reproduce