GR plots not shown in own GUI when using Atom

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

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.
1 Like