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})
|
function Base.show(io::IO, ::MIME"text/html", plt::Plot{PlotlyBackend})
|
||||||
prepare_output(plt)
|
prepare_output(plt)
|
||||||
write(io, html_head(plt) * html_body(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
|
||||||
end
|
end
|
||||||
|
|
||||||
function _show(io::IO, m, plt::Plot{B}) where B
|
# delegate mimewritable (showable on julia 0.7) to _show instead
|
||||||
# Base.show_backtrace(STDOUT, backtrace())
|
function Base.mimewritable(m::M, plt::P) where {M<:MIME, P<:Plot}
|
||||||
warn("_show is not defined for this backend. m=", string(m))
|
return method_exists(_show, Tuple{IO, M, P})
|
||||||
end
|
end
|
||||||
|
|
||||||
function _display(plt::Plot)
|
function _display(plt::Plot)
|
||||||
warn("_display is not defined for this backend.")
|
warn("_display is not defined for this backend.")
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user