# Blank plots from Gadfly in Juno

**URL:** <https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975>\
**Category:** Visualization\
**Tags:** juno\
**Created:** [May 22, 2020, 3:31pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975 "2020-05-22T15:31:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)\
**Post date:** [May 22, 2020, 3:31pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/1 "2020-05-22T15:31:19Z")

</div>

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:

```julia
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.

```julia
(@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
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = "C:\Users\klaff\AppData\Local\atom\app-1.47.0\atom.exe" -a
  JULIA_NUM_THREADS = 4

```

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [May 22, 2020, 3:33pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/2 "2020-05-22T15:33:48Z")

</div>

See

> <https://github.com/JunoLab/Juno.jl/issues/583>
>
> After updating to 0.12.5, \`Interact\` output stopped showing in the plot pane
> 
> …## Details
> \- Atom version: 1.47.0
> \- Julia version: 1.4.1
> \- OS: Windows 10
> \- Package versions:
> - Atom.jl: 0.12.11
> - julia-client: 0.12.5
> - ink: 0.12.4
> 
> \### Steps to reproduce
> 
> 1. Evaluate any \`Interact\` widget, e.g. \`@manipualte\` or
> \`\`\`
> using Interact
> slider(1:4)
> \`\`\`
> 
> The plot pane remains/becomes empty.

---

<div class="post-metadata">

**Author:** ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)\
**Post date:** [May 22, 2020, 3:50pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/3 "2020-05-22T15:50:23Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)\
**Post date:** [May 26, 2020, 2:36pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/4 "2020-05-26T14:36:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [May 26, 2020, 2:39pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/5 "2020-05-26T14:39:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)\
**Post date:** [May 26, 2020, 2:46pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/6 "2020-05-26T14:46:44Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![klaff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/klaff/32/7637_2.png) [@klaff](https://discourse.julialang.org/u/klaff)\
**Post date:** [May 28, 2020, 9:55pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/7 "2020-05-28T21:55:35Z")

</div>

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 …)

---

<div class="post-metadata">

**Author:** ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)\
**Post date:** [May 28, 2020, 10:03pm UTC](https://discourse.julialang.org/t/blank-plots-from-gadfly-in-juno/39975/8 "2020-05-28T22:03:46Z")

</div>

For Gadfly:

> [@Can I choose display software?](https://discourse.julialang.org/t/can-i-choose-display-software/29510/3):
>
> Welcome to the Julia community! It can be done by overriding [this function](https://github.com/GiovineItalia/Gadfly.jl/blob/aa4855ca7d113e31a51389edbfdd87cff15a60a2/src/Gadfly.jl#L1016-L1034) like so: using Compose, Gadfly function Gadfly.display(d::Gadfly.GadflyDisplay, p::Union{Plot,Compose.Context}) display(d, Gadfly.default\_mime(), p) return end Then a test: set\_default\_plot\_format(:svg) plot(x=1:10, y=rand(10), Geom.point) import Cairo set\_default\_plot\_format(:pdf) plot(x=1:10, y=rand(10), Geom.point) The plot will open in whatever your default program for svg, pdf is.
