PlotlyJS example failure

Dear All,

I would like to ask for help/advice with following problem. Previously, I used PlotlyJS on Julia 1.1.1 for plotting 3D objects. Unfortunately, after upgrading to Julia 1.4.2 (I deleted Atom + Julia and re-installed it from scratch), PlotlyJS ceased to work.

Here is a minimal working example of my problem (example code from documentation of PlotlyJS.jl). While Julia doesn’t report any problem running following code, nothing is displayed in the “Plots” window, even after using display() command. I also checked, that Plots.jl package works without any problem.

Could somebody please gave me some advice, how to dealt with this problem?

Best,
Honza

using Pkg

Pkg.add("Plots")
Pkg.update("Plots")
Pkg.build("Plots")
Pkg.add("PlotlyJS")
Pkg.update("PlotlyJS")
Pkg.build("PlotlyJS")
using PlotlyJS


trace1 = PlotlyJS.scatter(;x=1:4, y=[10, 15, 13, 17], mode="markers")
trace2 = PlotlyJS.scatter(;x=2:5, y=[16, 5, 11, 9], mode="lines")
trace3 = PlotlyJS.scatter(;x=1:4, y=[12, 9, 15, 12], mode="lines+markers")
Pllt = PlotlyJS.plot([trace1, trace2, trace3])

display(Pllt)

Here is my version info

Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = "C:\Users\janze\AppData\Local\atom\app-1.47.0\atom.exe"  -a
  JULIA_NUM_THREADS = 6

And Repl output when I downloaded and built packages

 Documentation: https://docs.julialang.org   
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.       
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.4.2 (2020-05-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release     
|__/                   |
 registry at `C:\Users\janze\.julia\registries\General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git` 
  Resolving package versions...
   Updating `C:\Users\janze\.julia\environments\v1.4\Project.toml`    
 [no changes]
   Updating `C:\Users\janze\.julia\environments\v1.4\Manifest.toml`   
 [no changes]
   Updating registry at `C:\Users\janze\.julia\registries\General`    
   Updating git-repo `https://github.com/JuliaRegistries/General.git` 
   Updating `C:\Users\janze\.julia\environments\v1.4\Project.toml`    
 [no changes]
   Updating `C:\Users\janze\.julia\environments\v1.4\Manifest.toml`   
 [no changes]
   Building GR ───→ `C:\Users\janze\.julia\packages\GR\cRdXQ\deps\build.log`
   Building Plots → `C:\Users\janze\.julia\packages\Plots\JKY3H\deps\build.log`
  Resolving package versions...
   Updating `C:\Users\janze\.julia\environments\v1.4\Project.toml`
 [no changes]
   Updating `C:\Users\janze\.julia\environments\v1.4\Manifest.toml`   
 [no changes]
   Updating registry at `C:\Users\janze\.julia\registries\General`
   Updating git-repo `https://github.com/JuliaRegistries/General.git` 
   Updating `C:\Users\janze\.julia\environments\v1.4\Project.toml`    
 [no changes]
   Updating `C:\Users\janze\.julia\environments\v1.4\Manifest.toml`   
 [no changes]
   Building WebIO ───→ `C:\Users\janze\.julia\packages\WebIO\nTMDV\deps\build.log`
   Building Blink ───→ `C:\Users\janze\.julia\packages\Blink\u1xcH\deps\build.log`
   Building PlotlyJS → `C:\Users\janze\.julia\packages\PlotlyJS\AhkM5\deps\build.log

Works for me with

julia> versioninfo()                                                  
Julia Version 1.5.0-beta1.0                                           
Commit 6443f6c95a (2020-05-28 17:42 UTC)                              
Platform Info:                                                        
  OS: Windows (x86_64-w64-mingw32)                                    
  CPU: Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz                      
  WORD_SIZE: 64                                                       
  LIBM: libopenlibm                                                   
  LLVM: libLLVM-9.0.1 (ORCJIT, sandybridge)                           
Environment:                                                          
  JULIA_NUM_THREADS = 1   

Both from the repl and from a script.

Edit: Now I realize that may be what needed to be tested was Atom. I ran it in Sublime Text 4.

What puzzles me a bit is the fact, that previously it worked without any problem in Atom :D. When I run it in script/repl, it doesn’t throw any error, everything looks perfectly ok, except that “plots” window remains dark…

Does it work without Plots, just PlotlyJS? It does for me.

By the way, my plot comes up in an Electron window, is not integrated into the IDE.

I tried it also without Plots.jl, it doesn’t work either way.

Relevant issue: [BUG] Plotly plot is black in Juno · Issue #2704 · JuliaPlots/Plots.jl · GitHub
TL;DR: It’s broken on Atom and should be fixed when Atom v1.48 gets released.

Thank you very much!

Could this issue be temporarily fixed by downgreading atom?

Best,
Honza

should be

You can disable the plot window in Atom/Juno by going to Juno, Settings, UI Options, and unchecking the Enable Plot Pane setting. Then PlotlyJS will launch separate windows with your graphs.

1 Like

Thank you very much!

This is at least temporary solution.