I have a Pluto notebook that grew somewhat in size, and now I want to plot some data in it. If I give plotlyjs()
backend selection command in notebook I get error saying PlutoJS could not be found in environment. Which, as I understand, is due to notebook having own environment
ArgumentError: Package PlotlyJS not found in current path:
- Run
import Pkg; Pkg.add("PlotlyJS")
to install the PlotlyJS package.
- require (::Module, ::Symbol)@ loading.jl:967
- top-level scope @ backends.jl:660
- eval @ boot.jl:373 [inlined]
- _initialize_backend (::Plots.PlotlyJSBackend)@ backends.jl:659
- backend (::Plots.PlotlyJSBackend)@ backends.jl:176
- plotlyjs#250 @ backends.jl:31 [inlined]
- plotlyjs @ backends.jl:31 [inlined]
- top-level scope @ Local: 1 [inlined]
But if I import both PlotlyJS and Plots, I get lots of namespace clashes.
Including the Pkg manually (as below ) disables established Notebook environment, and I get errors saying all previous imports are not available, and would require me to manually add and load in julia terminal.
begin
import Pkg;
Pkg.activate(Base.current_project())
Pkg.instantiate()
Pkg.add("PlotlyJS")
end
Error:
ArgumentError: Package SphericalHarmonics not found in current path:
- Run
import Pkg; Pkg.add("SphericalHarmonics")
to install the SphericalHarmonics package.
- require (::Module, ::Symbol)@ loading.jl:967
- top-level scope @ Local: 1
Is there a workaround to it other than loading both libraries then using Plots.plot
etc all the time?
I cannot use PlotlyJS.plot
because that runs into WebIO error that has been reported on Github Issues.