forward showable call to _show instead of show since all backends return true otherwise
This commit is contained in:
parent
afe4817150
commit
2d280edf0c
@ -922,15 +922,6 @@ end
|
||||
# ----------------------------------------------------------------
|
||||
|
||||
|
||||
function _show(io::IO, ::MIME"image/png", plt::Plot{PlotlyBackend})
|
||||
# show_png_from_html(io, plt)
|
||||
error("png output from the plotly backend is not supported. Please use plotlyjs instead.")
|
||||
end
|
||||
|
||||
function _show(io::IO, ::MIME"image/svg+xml", plt::Plot{PlotlyBackend})
|
||||
error("svg output from the plotly backend is not supported. Please use plotlyjs instead.")
|
||||
end
|
||||
|
||||
function Base.show(io::IO, ::MIME"text/html", plt::Plot{PlotlyBackend})
|
||||
prepare_output(plt)
|
||||
write(io, html_head(plt) * html_body(plt))
|
||||
|
||||
@ -195,10 +195,11 @@ function Base.show(io::IO, ::MIME"text/html", plt::Plot)
|
||||
end
|
||||
end
|
||||
|
||||
function _show(io::IO, m, plt::Plot{B}) where B
|
||||
# Base.show_backtrace(STDOUT, backtrace())
|
||||
warn("_show is not defined for this backend. m=", string(m))
|
||||
# delegate mimewritable (showable on julia 0.7) to _show instead
|
||||
function Base.mimewritable(m::M, plt::P) where {M<:MIME, P<:Plot}
|
||||
return method_exists(_show, Tuple{IO, M, P})
|
||||
end
|
||||
|
||||
function _display(plt::Plot)
|
||||
warn("_display is not defined for this backend.")
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user