Hi,
I use (GL)Makie for animations. When I replace using GLMakie
with using WGLMakie
its fails:
ERROR: type GenericIOBuffer has no field io
Is it possible to display animations via WGLMakie ? Is there an example available ?
Thank you for your help.
Laurent
I think I fixed that in the most recent release. In general, it helps a ton, if you can post a small example to reproduce the error
Hi Simon,
thank you very much for your reply. I apologize for the missing MWE: I though that the answer might have been that this feature was not covered by WGLMakie.
Here is the MWE :
using WGLMakie # OK with GLMakie
function test(n,nh)
scene = Scene()
x = [(i-1)*2π/(n-1) for i in 1:n]
y = sin.(x)
xn = Node(y)
scatter!(scene,lift(x -> x , xn),markersize=5,color = :red)
lines!(scene,lift(x -> x , xn),color = :blue)
record(scene, "output.mp4", 1:nh) do j
y .= sin.(x .+ 2π*j/nh)
xn[] = y
end
end
test(100,100)
Pkg Status
(MovieMakie.jl) pkg> status
Status `~/Projects/Spring.jl/MovieMakie.jl/Project.toml`
[537997a7] AbstractPlotting v0.14.2
[497a8b3b] DoubleFloats v1.1.15
[e9467ef8] GLMakie v0.1.20
[be4d8f0f] Quadmath v0.5.4
[276b4fcb] WGLMakie v0.2.10
versionfino()
julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = "/snap/code/52/usr/share/code/code"
JULIA_NUM_THREADS =
BTW, is there a simple way to skip the movie generation and only enjoy the animation ?
Yes, just replace record with this:
display(scene)
foreach(1:nh) do j
y .= sin.(x .+ 2π*j/nh)
xn[] = y
yield()
end
2 Likes
Ach, yield()
of course.
Thank you very much again !
When you mention the latest version, does this mean that my MWE should work with it ? I think that I use the latest release and I obtain an error…
The “live” display is OK with, display
,yield
and WGLMakie
.
Thank you again !