When using julia v0.7 and plotting using Plots/gr() from Atom, plots refuse to show in the GR gui. If I have plot pane enabled, they show up in the plot pane, when I deselect plot pane, they never show up. In julia 0.6 I had a similar issue which was solved by calling closeall(); gui() after creating a plot, which no longer works on v0.7. Plots from pyplot() show up just fine.
Package status for reference
(v0.7) pkg> st
Status `~/.julia/environments/v0.7/Project.toml`
[c52e3926] Atom v0.7.3
[28b8d3ca] GR v0.32.2
[e5e0dc1b] Juno v0.5.2
[b964fa9f] LaTeXStrings v1.0.2
[3b7a836e] PGFPlots v2.2.2
[995b91a9] PlotUtils v0.5.2
[58dd65bb] Plotly v0.1.1
[91a5bcdd] Plots v0.19.2
[438e738f] PyCall v1.17.1
[d330b81b] PyPlot v2.6.0
[3cdcf5f2] RecipesBase v0.5.0+ [`~/.julia/dev/RecipesBase`]
Actually, v0.32.3 did not solve the original problem, I still get no plots from atom when using Plots.jl
Using GR directly gives me plots in the plot pane, even though I have disabled the plot pane
julia> using Plots
julia> gr()
Plots.GRBackend()
julia> plot(randn(10))
julia> gui()
Yes, nothing happens. I have plot-pane disabled and no GUI is shown. The plots are shown just fine if I enable the plot pane, which I do not want to do.
I’m in the process of redesigning Plots.jl’s and GR’s display system such that it works well with Juno.
Both of those packages don’t really make use of Base’s display system, which is kind of unfortunate.
GR should imho follow the same design – push a GRDisplay <: AbstractDisplay to the Base display stack and provide the correct show and display methods. That would probably require a bit of a redesign of GR because e.g. plot() returns nothing instead of something Juno (or the REPL) can call show on.
Short description of how Juno handles plots right now:
We push a JunoDisplay to the top of the display stack.
display(::JunoDisplay, x) catches everything.
If there’s an appropriate show method for xand the plot pane is enabled in the settings we display x in the plot pane (by calling show on it). “Appropriate show method” means most image mime types ( image/svg+xml, image/png, image/jpeg, image/tiff, image/bmp, image/gif) as well as application/juno+plotpane which allows you to use arbitrary HTML.
If there’s no appropriate show method or the plot pane is disabled we don’t do anything and let the rest of the display stack handle displaying the plot. This is where PlotsDisplay (or the hypothetical GRDisplay) comes is relevant.
There’s a checkbox in the julia-client settings.
But I don’t really like this solution tbh, because there shouldn’t be any need for you to have any kind of dependency on Atom.jl. If you provide the correct show and display methods everything will just work fine without any package interdependencies.
Edit: My previous post wasn’t quite correct btw – we don’t make sure that JunoDisplay is on the top of the stack in the released version.
I discover today the option “Enable Plot Pane” in julia-client settings, but after unchecking it, I have the same problem as OP (plots never show up with GR backend), three months later
(v1.0) pkg> st -m
[c52e3926] Atom v0.7.10
[28b8d3ca] GR v0.35.0
[e5e0dc1b] Juno v0.5.3
[91a5bcdd] Plots v0.21.0