Skip to content

Commit

Permalink
ENH: don't special case html display for jupyter
Browse files Browse the repository at this point in the history
  • Loading branch information
sglyon committed Jan 8, 2019
1 parent 8951526 commit ffea050
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/backends/plotlyjs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ end

# ----------------------------------------------------------------

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)
end
end

function plotlyjs_save_hack(io::IO, plt::Plot{PlotlyJSBackend}, ext::String)
tmpfn = tempname() * "." * ext
Expand All @@ -67,6 +60,7 @@ _show(io::IO, ::MIME"image/svg+xml", plt::Plot{PlotlyJSBackend}) = plotlyjs_save
_show(io::IO, ::MIME"image/png", plt::Plot{PlotlyJSBackend}) = plotlyjs_save_hack(io, plt, "png")
_show(io::IO, ::MIME"application/pdf", plt::Plot{PlotlyJSBackend}) = plotlyjs_save_hack(io, plt, "pdf")
_show(io::IO, ::MIME"image/eps", plt::Plot{PlotlyJSBackend}) = plotlyjs_save_hack(io, plt, "eps")
_show(io::IO, ::MIME"text/html", plt::Plot{PlotlyJSBackend}) = show(io, MIME("text/html"), plt.o)

function write_temp_html(plt::Plot{PlotlyJSBackend})
filename = string(tempname(), ".html")
Expand Down

0 comments on commit ffea050

Please sign in to comment.