IJulia and REPL plotting seems to work again, however from REPL plot! creates a new empty window in addition to updating existing window, but only if run on a seperate line, running plot(rand(10));plot!(rand(5)) doesn't create the extra window
This commit is contained in:
parent
eaad735d22
commit
01742cffa6
@ -12,7 +12,9 @@ const _plotlyjs_scale = _plotly_scale
|
|||||||
|
|
||||||
function _create_backend_figure(plt::Plot{PlotlyJSBackend})
|
function _create_backend_figure(plt::Plot{PlotlyJSBackend})
|
||||||
if !isplotnull() && plt[:overwrite_figure] && isa(current().o, PlotlyJS.SyncPlot)
|
if !isplotnull() && plt[:overwrite_figure] && isa(current().o, PlotlyJS.SyncPlot)
|
||||||
PlotlyJS.SyncPlot(PlotlyJS.Plot(), current().o.view)
|
p = PlotlyJS.plot()
|
||||||
|
p.window = current().o.window
|
||||||
|
p
|
||||||
else
|
else
|
||||||
PlotlyJS.plot()
|
PlotlyJS.plot()
|
||||||
end
|
end
|
||||||
@ -57,11 +59,7 @@ end
|
|||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
function _show(io::IO, ::MIME"text/html", plt::Plot{PlotlyJSBackend})
|
function _show(io::IO, ::MIME"text/html", plt::Plot{PlotlyJSBackend})
|
||||||
if isijulia() && !_use_remote[]
|
|
||||||
write(io, PlotlyJS.html_body(PlotlyJS.JupyterPlot(plt.o)))
|
|
||||||
else
|
|
||||||
show(io, MIME("text/html"), plt.o)
|
show(io, MIME("text/html"), plt.o)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function plotlyjs_save_hack(io::IO, plt::Plot{PlotlyJSBackend}, ext::String)
|
function plotlyjs_save_hack(io::IO, plt::Plot{PlotlyJSBackend}, ext::String)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user