IJulia, WGLMakie, and JupyterLab: No output

Ludovic_Dumoulin
Wed, 27 Oct 2021 10:18:51 +0000
Jupyter-Notebook

Hello,

I am using IJulia and WGLMakie, and I’d like to make interactive plot. Unfortunately when I run this code in a cell, there is no output…

Nz = 100
Nt = 10
ρ_t = rand(Nz, Nt)

using Makie: Slider
using WGLMakie
WGLMakie.activate!()

n = Node(1)
ρl = lift(n) do n
    ρ_t[:,n]
end

fig = Figure(resolution = (1400, 800)) #
ax = Axis(fig[1,1])
xlims!(ax, 0, Nz)
ylims!(ax, -1, 2)
lines!(ax, ρl; linewidth = 5)
sl = Makie.Slider(fig[2, 1], range = 1:Nt, startvalue = 1)
connect!(n, sl.value)
fig

But if I copy-past this code in an other notebook (with the same kernel) it works and I have an output. Then I copy-past this same code in an other notebook with the same kernel it does not work anymore…

I don’t understand. I use Windows and Google Chrome.

Thank you for your help.

2 posts - 2 participants