Blank plots from Gadfly in Juno

I’m trying out Gadfly because I want to be able to zoom and pan on some data, and I’m having trouble getting plots to display in Juno.

I’m using this example from the tutorial:

using Gadfly, RDatasets
iris = dataset("datasets", "iris")
plot(iris, x=:SepalLength, y=:SepalWidth)

If I run it in Juno, I get a blank plot in the Plots window of Juno. It is specifically a blank (or black?) plot - I can delete it from the Plots window. If I run the example from a command line, it creates the plot correctly in an html file and opens a web browser tab. I’m not sure if this is a Juno or Gadfly issue but I can use Plots.jl just fine in Juno.

(@v1.4) pkg> status
Status `C:\Users\klaff\.julia\environments\v1.4\Project.toml`
  [c52e3926] Atom v0.12.11
  [6e4b80f9] BenchmarkTools v0.5.0
  [336ed68f] CSV v0.6.1
  [459566f4] DiffEqCallbacks v2.13.2
  [0c46a032] DifferentialEquations v6.14.0
  [31c24e10] Distributions v0.23.2
  [c91e804a] Gadfly v1.2.1
  [eafb193a] Highlights v0.4.5
  [43edad99] InstantiateFromURL v0.5.0
  [c601a237] Interact v0.10.3
  [e5e0dc1b] Juno v0.8.2
  [b964fa9f] LaTeXStrings v1.1.0
  [2ee39098] LabelledArrays v1.2.1
  [0987c9cc] MonteCarloMeasurements v0.8.10
  [d96e819e] Parameters v0.12.1
  [91a5bcdd] Plots v1.3.2
  [f27b6e38] Polynomials v1.0.6
  [27ebfcd6] Primes v0.4.0
  [9516f557] Psychro v0.2.1
  [ce6b1742] RDatasets v0.6.8
  [f2b01f46] Roots v1.0.1
  [4c63d2b9] StatsFuns v0.9.5
  [f3b207a7] StatsPlots v0.14.6
  [1986cc42] Unitful v0.18.0
  [9a3f8284] Random
  [8dfed614] Test

julia> versioninfo()
Julia Version 1.4.1
Commit 381693d3df* (2020-04-14 17:20 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
  JULIA_EDITOR = "C:\Users\klaff\AppData\Local\atom\app-1.47.0\atom.exe"  -a


1 Like

Thank you!

Is it possible to disable the plot window in Juno, or to tell plotting libraries (I’m trying PlotlyJS right now) to plot to their own window, rather than trying to use Juno’s plot window?

Sure, you can disable it in julia-clients settings under UI Options > Enable Plot Pane.


Thank you!

Do you know if there’s a way to redirect plotting output (to Juno or not) from within the Julia programs? Perhaps as options from within plotting commands? I’m doing some things in Plots.jl and others in PlotlyJS.jl and would like to not have to push the option back and forth. (Now that I read that it sounds lazy …)

For Gadfly: