Fix embeding of PlotlyJS plots in Jupyter
This commit is contained in:
parent
8204b51213
commit
2c3d35d249
@ -86,8 +86,12 @@ end
|
|||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
function _show(io::IO, ::MIME"image/svg+xml", plt::Plot{PlotlyJSBackend})
|
function _show(io::IO, ::MIME"image/svg+xml", plt::Plot{PlotlyJSBackend})
|
||||||
|
if Plots.isijulia()
|
||||||
|
print(io, PlotlyJS.html_body(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)
|
||||||
tmpfn = tempname() * "." * ext
|
tmpfn = tempname() * "." * ext
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user