That seems oddβ¦
Youβre using a notebook, which, Pluto?
Iβm not on Windows (which I doubt is the problem, but canβt rule out), and Iβm using the REPL, not a notebook, and I can plot with using your code, in 1.9.2. I could plot in a fraction of a second, for second plot, but it took a few seconds for the firstβ¦
(@v1.9) pkg> st
Status `~/.julia/environments/v1.9/Project.toml`
β [13f3f980] CairoMakie v0.10.2
β [e9467ef8] GLMakie v0.8.2
β
[20f20a25] MakieCore v0.6.2
[f0f68f2c] PlotlyJS v0.18.10
[91a5bcdd] Plots v1.38.17
Info Packages marked with β and β
have new versions available, but those with β
are restricted by compatibility constraints from upgrading. To see why use `status --outdated`
The ββ and β
β need not be a problem, while ideally you donβt want to see them in front of the (plotting) packages you use, in this case PlotlyJS AND Plots). While [GL]Makie is a plotting package, itβs a different one, and you donβt need to see anything related to it, since youβre not using it, otherwise same advice would apply. In your case you would like Pluto and/or IPython or whatever youβre using to additionally be at the latest version. I tried installing them, and it worked, though I got a downgradeβ¦:
β
[34da2185] β Compat v4.9.0 β v3.46.2
This is considered ok to do for the package manager, since any combination of packages should be safe (and IPython insists), but that may not be the caseβ¦, and this is not a problem for IPython, but could be for other packages (if their Projects.toml file is wrong).
See below on possible segfault, that I encountered, and solution. What I did:
julia> using Plots; plotlyjs()
ERROR: ArgumentError: Package Plots not found in current path.
- Run `import Pkg; Pkg.add("Plots")` to install the Plots package.
Iβm not sure why I got (an unrelated error, that could have been your issue for your relevant package, I have unusually large environment, but it still should have worked the first time around, compiling Makie):
julia> using PlotlyJS
β Package PlotlyJS not found, but a package named PlotlyJS is available from a registry.
β Install package?
β (@v1.9) pkg> add PlotlyJS
β (y/n/o) [y]: y
Resolving package versions...
Installed WebSockets ββββββββββββ v1.6.0
Installed PlotlyBase ββββββββββββ v0.8.19
Installed Kaleido_jll βββββββββββ v0.2.1+0
Installed Mustache ββββββββββββββ v1.0.17
Installed Blink βββββββββββββββββ v0.12.8
Installed FunctionalCollections β v0.5.0
Installed Widgets βββββββββββββββ v0.6.6
Installed WebIO βββββββββββββββββ v0.8.21
Installed JSExpr ββββββββββββββββ v0.5.4
Installed PlotlyJS ββββββββββββββ v0.18.10
Downloaded artifact: plotly-base-artifacts
Downloaded artifact: web
Downloaded artifact: electronjs_app
Downloaded artifact: plotly-artifacts
Downloaded artifact: Kaleido
Updating `~/.julia/environments/v1.9/Project.toml`
[f0f68f2c] + PlotlyJS v0.18.10
Updating `~/.julia/environments/v1.9/Manifest.toml`
[bf4720bc] + AssetRegistry v0.1.0
[ad839575] + Blink v0.12.8
[de31a74c] + FunctionalCollections v0.5.0
[9fb69e20] + Hiccup v0.2.2
[97c1335a] + JSExpr v0.5.4
[50d2b5c4] + Lazy v0.15.1
[ffc61752] + Mustache v1.0.17
[a975b10e] + Mux v1.0.1
[d96e819e] + Parameters v0.12.3
[a03496cd] + PlotlyBase v0.8.19
[f0f68f2c] + PlotlyJS v0.18.10
[3a884ed6] + UnPack v1.0.2
[0f1e0344] + WebIO v0.8.21
[104b5d7c] + WebSockets v1.6.0
[cc8bc4a8] + Widgets v0.6.6
[f7e6163d] + Kaleido_jll v0.2.1+0
Building WebIO ββββ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/0eef0765186f7452e52236fa42ca8c9b3c11c6e3/build.log`
Building PlotlyJS β `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/7452869933cd5af22f59557390674e8679ab2338/build.log`
Precompiling project...
β Plots
43 dependencies successfully precompiled in 297 seconds. 264 already precompiled.
1 dependency precompiled but a different version is currently loaded. Restart julia to access the new version
Segmentation fault (core dumped)
As you see there ββ Plotsβ Plots was precompiled for me. And I believe I saw Makie after that being precompiled, and I suppose it didnβt finish precompiling, possibly it was buggy in the old version (Iβve never before had a segfault while precompiling, though I often get OOM because of parallel precompilation, so I frequently CTRL-C to stop it, I didnβt in this case).
Without working on fixing that (likely or potential problem), plotting with the other, what you are using, worked for me.
If you had gotten a segfault for Plots or PlotlyJS for some reason (running out of memory should not be it), then I wouldnβt expect that package, or any relevant it happened to to succeed.
I did this since I got a segfault (and didnβt see it again, so I suppose Makie would work if I would test it), also to updated versions just in case:
(@v1.9) pkg> up
..
Updating `~/.julia/environments/v1.9/Project.toml`
[13f3f980] β CairoMakie v0.10.2 β v0.10.8
[e9467ef8] β GLMakie v0.8.2 β v0.8.8
[c43c736e] β Genie v5.15.0 β v5.18.1
[20f20a25] β MakieCore v0.6.2 β v0.6.5
[6099a3de] β PythonCall v0.9.12 β v0.9.14
Updating `~/.julia/environments/v1.9/Manifest.toml`
[621f4979] β AbstractFFTs v1.3.0 β v1.5.0
Precompiling project...
Progress [========================================>] 269/272
β Libgcrypt_jll
[..]
β Plots
β PlotlyJS
β Makie
The spinner before make didnβt copy-paste correctly, eventually it went away, and was replaced by:
β GLMakie
this finished successfully with:
272 dependencies successfully precompiled in 370 seconds. 79 already precompiled.
112 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions
2 dependencies had warnings during precompilation:
β micromamba_jll [f8abcde7-e9b7-5caa-b8af-a437887ae8e4]
β Downloading artifact: micromamba
β
β MKL_jll [856f044c-d86e-5d09-b602-aeab76dc8ba7]
β Downloading artifact: MKL
β
[ Info: We haven't cleaned this depot up for a bit, running Pkg.gc()...
Active manifest files: 13 found
Active artifact files: 218 found
Active scratchspaces: 23 found
Deleted 86 package installations (175.134 MiB)
Deleted 7 repos (366.037 KiB)
Deleted 7 artifact installations (206.124 MiB)
Deleted 48 scratchspaces (7.631 KiB)