PlotlyJS.jl
PlotlyJS.jl copied to clipboard
pop window exits after loadind animation displayed
Describe the bug
running from shell and it pops a window but exits before plot shows.
running in vscode can normally display plots
Version info
julia> versioninfo()
Julia Version 1.8.0
Commit 5544a0fab76 (2022-08-17 13:38 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 × AMD Ryzen 9 5900HS with Radeon Graphics
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, znver3)
Threads: 1 on 16 virtual cores
Can you post the code?
Can you post the code?
using PlotlyJS, CSV, DataFrames
df = dataset(DataFrame, "iris")
plt = plot(
df,
x=:sepal_length, y=:sepal_width, z=:petal_width, color=:species,
type="scatter3d", mode="markers"
)
display(plt)
and there is no output in the terminal
Maybe you may need a backend for plotting, e.g. using WebIO
?
Maybe you may need a backend for plotting, e.g.
using WebIO
?
WebIO is installed, and there is no difference after added using WebIO
.
I think it's a electron problem, the electron process starts and shows the window and loading animation before exits.
The exported html file using PlotlyBase.to_html
works well.
Does the following work?
using WebIO, PlotlyJS
plot(scatter(y=randn(100)))
using WebIO, PlotlyJS
p=plot(scatter(y=randn(100)))
display(p)
when using display to show the gui, it still crash.
Could it be a WebIO issue? What happens if you pin the package to v0.8.17 as in https://github.com/JuliaGizmos/WebIO.jl/issues/493#issuecomment-1175841764?
still the same
What is the output of import Pkg; Pkg.status()
?
Status `~/repos/fast/Project.toml`
[336ed68f] CSV v0.10.4
[a93c6f00] DataFrames v1.3.4
[28b8d3ca] GR v0.66.2
[f0f68f2c] PlotlyJS v0.18.8
[d330b81b] PyPlot v2.11.0
⌃ [0f1e0344] WebIO v0.8.17 ⚲
Info Packages marked with ⌃ have new versions available
i found more about this bug.
if i run julia --project=. a.jl
, the window will crash.
if i run julia --project=.
and then run include("a.jl")
in the repl, the window won't crash.
You need to put a readline()
or similar at the end of your script to prevent the julia process from shutting down immediately