# GR plots not shown in own GUI when using Atom

**URL:** <https://discourse.julialang.org/t/gr-plots-not-shown-in-own-gui-when-using-atom/13551>\
**Category:** General Usage\
**Tags:** juno, plotting\
**Created:** [August 16, 2018, 7:57am UTC](https://discourse.julialang.org/t/gr-plots-not-shown-in-own-gui-when-using-atom/13551 "2018-08-16T07:57:17Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [August 16, 2018, 10:12am UTC](https://discourse.julialang.org/t/gr-plots-not-shown-in-own-gui-when-using-atom/13551/10 "2018-08-16T10:12:07Z")

</div>

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.

PR for Plots.jl:  
[https://github.com/JuliaPlots/Plots.jl/pull/1667](https://github.com/JuliaPlots/Plots.jl/pull/1667)

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:

1. We push a `JunoDisplay` to the top of the display stack.
2. `display(::JunoDisplay, x)` catches _everything_.
3. If there’s an appropriate `show` method for `x` _and_ 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.
4. 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.

---

_[View the full topic](https://discourse.julialang.org/t/gr-plots-not-shown-in-own-gui-when-using-atom/13551)._
