Skip to content

Commit

Permalink
Merge pull request #224 from kleskjr/display_blink
Browse files Browse the repository at this point in the history
ENH: enables dynamical plotting when run in terminal or atom
  • Loading branch information
sglyon authored Sep 17, 2018
2 parents eeb5798 + 6680099 commit 9220935
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/display.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ function Base.display(::REPL.REPLDisplay, p::SyncPlot)
Blink.body!(p.window, p.scope)
end

Base.display(p::SyncPlot) = display_blink(p)

function display_blink(p::SyncPlot)
p.window = Blink.Window()
Blink.body!(p.window, p.scope)
end

function Base.close(p::SyncPlot)
if p.window !== nothing && Blink.active(p.window)
close(p.window)
Expand Down

0 comments on commit 9220935

Please sign in to comment.