JuliaPlots / PlotlyJS.jl

Julia library for plotting with plotly.js
Other
420 stars 78 forks source link

Too many active WebGL contexts. Oldest context will be lost #376

Open alexlenail opened 3 years ago

alexlenail commented 3 years ago

Describe the bug I'm in jupyterlab, exploring data, making plotlyjs.jl plots via Plots.jl. I see this warning in the console.

It's been brought up as an issue against plotly.js but the developers there say that if you're re-drawing your graph multiple times, it's your own fault. After drawing a certain number of 3d figures, my jupyterlab tab crashes.

Is there a way to 'free' or 'clear' old webGL contexts when re-running a cell in a jupyterlab notebook? Would it make sense to add some logic to that effect in the jupyterlab-plotly labextension? Or is there a way to do it more simply on my end?

julia 1.6.0 [58dd65bb] Plotly v0.4.0 [a03496cd] PlotlyBase v0.5.3 [f0f68f2c] PlotlyJS v0.14.1 [91a5bcdd] Plots v1.13.1