You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I create a plot in Julia 1.6.3 with the current versions of Interact.jl and WebIO.jl and use the @manipulate macro to create a plot with an options box and a slider. The plots works and can be manipulated appropriately as you expect.
I am working on MacOS 12.0.1 with the most recent Conda Distribution installed.
Here is the code which I use in a jupyterlab notebook:
using Plots
using Interact
using DataStructures
x = y = 0:0.1:30
freqs = OrderedDict(zip(["π/4", "π/2", "3π/4", "π"], [π/4, π/2, 3π/4, π]))
mp = @manipulate for freq1 in freqs, freq2 in slider(0.01:0.1:4π; label="freq2")
y = @. sin(freq1*x) * sin(freq2*x)
plot(x, y)
end
This will run in a new notebooks as expected. BUT: save the notebook, restart jupyterlab and open the notebook and then the plot will be created but the interactive aspect will not work. Just to make things even more confusing (but this is likely a huge clue that I am seemingly incapable of using to solve the problem), if you open a blank notebook, copy and paste the code into a cell in that new notebook, it will work!
I've tried this on Safari, Chrome, and Firefox and the same behavior exists.
Can anyone shed light on this? The Interact widgets make Julia such a valuable tool for teaching, and although I could work in Pluto notebooks, I would really like to be able to work is standard Julia notebooks.
UPDATE: (19:39 UTC 12 Nov 2021)
Just checked the code above on PopOS! with Julia 1.6.3. Same problem. First time, it runs and sliders work. Save and quit browser, kill kernel and then restarting jupyter lab resultys in failure: plot is rendered, but sliders no longer update the plots when manipulated.
Thanks in advance. I am stumped.
The text was updated successfully, but these errors were encountered:
The same happens here, but if I 'reload the current page' (Ctrl-R) in firefox, it start working.
That helps me for now, and perhaps is a clue for further investigation.
I am totally stumped by the following:
I create a plot in Julia 1.6.3 with the current versions of Interact.jl and WebIO.jl and use the @manipulate macro to create a plot with an options box and a slider. The plots works and can be manipulated appropriately as you expect.
I am working on MacOS 12.0.1 with the most recent Conda Distribution installed.
Here is the code which I use in a jupyterlab notebook:
This will run in a new notebooks as expected. BUT: save the notebook, restart jupyterlab and open the notebook and then the plot will be created but the interactive aspect will not work. Just to make things even more confusing (but this is likely a huge clue that I am seemingly incapable of using to solve the problem), if you open a blank notebook, copy and paste the code into a cell in that new notebook, it will work!
I've tried this on Safari, Chrome, and Firefox and the same behavior exists.
Can anyone shed light on this? The Interact widgets make Julia such a valuable tool for teaching, and although I could work in Pluto notebooks, I would really like to be able to work is standard Julia notebooks.
UPDATE: (19:39 UTC 12 Nov 2021)
Just checked the code above on PopOS! with Julia 1.6.3. Same problem. First time, it runs and sliders work. Save and quit browser, kill kernel and then restarting jupyter lab resultys in failure: plot is rendered, but sliders no longer update the plots when manipulated.
Thanks in advance. I am stumped.
The text was updated successfully, but these errors were encountered: