Atom inline display

This commit is contained in:
Thomas Breloff 2016-08-09 13:15:04 -04:00
parent 5a87adaa7f
commit d59564999c

View File

@ -243,10 +243,18 @@ end
function setup_atom()
# @require Atom begin
if isatom() && get(ENV, "PLOTS_USE_ATOM_PLOTPANE", false) in (true, 1, "1", "true", "yes")
if isatom()
# @eval import Atom, Media
@eval import Atom
# for inline values, display the plot (gui) and return a graph icon
function Atom.Media.render(::Atom.Inline, plt::Plot)
display(PlotsDisplay(), plt)
Atom.icon("graph")
end
if get(ENV, "PLOTS_USE_ATOM_PLOTPANE", false) in (true, 1, "1", "true", "yes")
# # connects the render function
# for T in (GadflyBackend,ImmerseBackend,PyPlotBackend,GRBackend)
# Atom.Media.media(Plot{T}, Atom.Media.Plot)
@ -274,3 +282,4 @@ function setup_atom()
# end
end
end
end