1

I was trying to follow the document for package plotly for my own dataset, no matter what I write there is always error raised saying there are no methods match it, then I have tried the document example directly, there are still errors raised:

julia> plot([box(x=rand(50)),box(x=rand(50).+1)])
Error showing value of type PlotlyJS.SyncPlot:
ERROR: Cannot find Electron. Try `Blink.AtomShell.install()`.
Stacktrace:
  [1] electron
    @ C:\Users\姚力嫄\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:70 [inlined]
  [2] init(; debug::Bool)
    @ Blink.AtomShell C:\Users\姚力嫄\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:88
  [3] #shell#9
    @ C:\Users\姚力嫄\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:149 [inlined]
  [4] shell
    @ C:\Users\姚力嫄\.julia\packages\Blink\mwJC9\src\AtomShell\process.jl:140 [inlined]
  [5] #Window#14
    @ C:\Users\姚力嫄\.julia\packages\Blink\mwJC9\src\AtomShell\window.jl:89 [inlined]
  [6] Blink.AtomShell.Window(args::Dict{String, Int64})
    @ Blink.AtomShell C:\Users\姚力嫄\.julia\packages\Blink\mwJC9\src\AtomShell\window.jl:89
  [7] display_blink(p::PlotlyJS.SyncPlot)
    @ PlotlyJS C:\Users\姚力嫄\.julia\packages\PlotlyJS\Jj38U\src\display.jl:169
  [8] display(#unused#::PlotlyJS.PlotlyJSDisplay, p::PlotlyJS.SyncPlot)
    @ PlotlyJS C:\Users\姚力嫄\.julia\packages\PlotlyJS\Jj38U\src\display.jl:160
  [9] display(x::Any)
    @ Base.Multimedia .\multimedia.jl:328
 [10] #invokelatest#2
    @ .\essentials.jl:729 [inlined]
 [11] invokelatest
    @ .\essentials.jl:726 [inlined]
 [12] print_response(errio::IO, response::Any, show_value::Bool, have_color::Bool, specialdisplay::Union{Nothing, AbstractDisplay})
    @ REPL C:\Users\姚力嫄\AppData\Local\Programs\Julia-1.8.2\share\julia\stdlib\v1.8\REPL\src\REPL.jl:296
 [13] (::REPL.var"#45#46"{REPL.LineEditREPL, Pair{Any, Bool}, Bool, Bool})(io::Any)
    @ REPL C:\Users\姚力嫄\AppData\Local\Programs\Julia-1.8.2\share\julia\stdlib\v1.8\REPL\src\REPL.jl:278
 [14] print_response(repl::REPL.AbstractREPL, response::Any, show_value::Bool, have_color::Bool)
    @ REPL C:\Users\姚力嫄\AppData\Local\Programs\Julia-1.8.2\share\julia\stdlib\v1.8\REPL\src\REPL.jl:276
 [15] (::REPL.var"#do_respond#66"{Bool, Bool, REPL.var"#77#87"{REPL.LineEditREPL, REPL.REPLHistoryProvider}, REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::Any, ok::Bool)
    @ REPL C:\Users\姚力嫄\AppData\Local\Programs\Julia-1.8.2\share\julia\stdlib\v1.8\REPL\src\REPL.jl:857

julia> Blink.AtomShell.install()
ERROR: UndefVarError: Blink not defined
Stacktrace:
 [1] top-level scope
   @ REPL[65]:1

I think it might be the problem of my environment setting, does anyone have met this kind of situation before? Thanks in advance!

hahaha
  • 183
  • 5

2 Answers2

0

If you are running a PlotlyJS.jl version < 0.18.10, try to update to the last one (i.e. 0.18.10) or run the code in a Jupyter Notebook.

xecafe
  • 740
  • 6
  • 12
0

Try instead using Plots.jl with PlotlyJS backend, gives same interactive plots as PlotlyJS.jl. Use StatsPlots.jl for the box plots. The following command shall work for your case.

using Plots, StatsPlots; plotlyjs()
boxplot([rand(50),rand(50).+1])
Tyler2P
  • 2,324
  • 26
  • 22
  • 31
himanshu
  • 11
  • 4