Atom inline display
This commit is contained in:
parent
5a87adaa7f
commit
d59564999c
@ -243,10 +243,18 @@ end
|
|||||||
|
|
||||||
function setup_atom()
|
function setup_atom()
|
||||||
# @require Atom begin
|
# @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, Media
|
||||||
@eval import Atom
|
@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
|
# # connects the render function
|
||||||
# for T in (GadflyBackend,ImmerseBackend,PyPlotBackend,GRBackend)
|
# for T in (GadflyBackend,ImmerseBackend,PyPlotBackend,GRBackend)
|
||||||
# Atom.Media.media(Plot{T}, Atom.Media.Plot)
|
# Atom.Media.media(Plot{T}, Atom.Media.Plot)
|
||||||
@ -273,4 +281,5 @@ function setup_atom()
|
|||||||
# html = Media.render(pane, Atom.div(Atom.d(), Atom.HTML(stringmime(MIME("text/html"), plt))))
|
# html = Media.render(pane, Atom.div(Atom.d(), Atom.HTML(stringmime(MIME("text/html"), plt))))
|
||||||
# end
|
# end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user