added svg in pyplot; deprecate qwt; writemime backup for html

This commit is contained in:
Thomas Breloff 2016-03-09 13:36:21 -05:00
parent ded9f332f6
commit fd4dd13270
3 changed files with 8 additions and 1 deletions

View File

@ -869,7 +869,7 @@ const _pyplot_mimeformats = @compat Dict(
"application/pdf" => "pdf",
"image/png" => "png",
"application/postscript" => "ps",
# "image/svg+xml" => "svg"
"image/svg+xml" => "svg"
)
@ -888,6 +888,7 @@ for (mime, fmt) in _pyplot_mimeformats
end
end
# function Base.writemime(io::IO, m::MIME"image/png", subplt::Subplot{PyPlotPackage})
# finalizePlot(subplt)
# writemime(io, m, getfig(subplt.o))

View File

@ -3,6 +3,7 @@
function _initialize_backend(::QwtPackage; kw...)
@eval begin
warn("Qwt is no longer supported... many features will likely be broken.")
import Qwt
export Qwt
end

View File

@ -112,3 +112,8 @@ gui(plt::PlottingObject = current()) = display(PlotsDisplay(), plt)
# override the REPL display to open a gui window
Base.display(::Base.REPL.REPLDisplay, ::MIME"text/plain", plt::PlottingObject) = gui(plt)
# a backup for html... passes to svg
function Base.writemime(io::IO, ::MIME"text/html", plt::PlottingObject)
writemime(io, MIME("image/svg+xml"), plt)
end