Remove SVG support, which is not there

plotly backend does not support SVG output. What it shows is the HTML output of Plotly backend.
This commit makes the request for SVG output to return an error as in PNG.
This commit is contained in:
Hamza Yusuf Çakır 2018-04-05 02:53:50 +03:00 committed by GitHub
parent 9acb89ba8a
commit e30f4652af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -908,7 +908,7 @@ function _show(io::IO, ::MIME"image/png", plt::Plot{PlotlyBackend})
end end
function _show(io::IO, ::MIME"image/svg+xml", plt::Plot{PlotlyBackend}) function _show(io::IO, ::MIME"image/svg+xml", plt::Plot{PlotlyBackend})
write(io, html_head(plt) * html_body(plt)) error("svg output from the plotly backend is not supported. Please use plotlyjs instead.")
end end
function Base.show(io::IO, ::MIME"text/html", plt::Plot{PlotlyBackend}) function Base.show(io::IO, ::MIME"text/html", plt::Plot{PlotlyBackend})