Plots with PlotlyJS error

I am trying to use Plots with the PlotlyJS backend. Using 1.11.6 on Win 11 my code snippet is:

using Plots
using PlotlyKaleido
using PlotlyJS
plotlyjs()

I get this message:


Precompiling PlotlyJS...
Info Given PlotlyJS was explicitly requested, output will be shown live

[pid 7724] waiting for IO to finish:
 Handle type        uv_handle_t->data
 pipe[840]          00000211cf6c6960->00000211cd91f8f0
 process[13240]     00000211c90c6db0->00000211cd674f90
This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.

Any ideas?

I don’t think it’s necessarily an error. I get this from time to time with other packages, but they still work fine.

As a side note, it seems strange to use Plots.jl with the plotlyjs() backend and then use PlotlyJS.jl directly at the same time.

1 Like

Thanks for pointing that out. I tried a few more iterations and am having problems. One of the error messages that I get states:

julia> plotlyjs()
ERROR: ArgumentError: Package PlotlyJS not found in current path.
- Run `import Pkg; Pkg.add("PlotlyJS")` to install the PlotlyJS package.

which I attempted to do.

What should I be doing to use the plotlyjs backend? And should I be filing a bug report?

As indicated in the error message, you should add the package to your environment, but then just load it indirectly via:
using Plots; plotlyjs()

Check also this section of the manual for more details.

1 Like