Skip to content

Commit fd4dd13

Browse files
committed
added svg in pyplot; deprecate qwt; writemime backup for html
1 parent ded9f33 commit fd4dd13

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/backends/pyplot.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ const _pyplot_mimeformats = @compat Dict(
869869
"application/pdf" => "pdf",
870870
"image/png" => "png",
871871
"application/postscript" => "ps",
872-
# "image/svg+xml" => "svg"
872+
"image/svg+xml" => "svg"
873873
)
874874

875875

@@ -888,6 +888,7 @@ for (mime, fmt) in _pyplot_mimeformats
888888
end
889889
end
890890

891+
891892
# function Base.writemime(io::IO, m::MIME"image/png", subplt::Subplot{PyPlotPackage})
892893
# finalizePlot(subplt)
893894
# writemime(io, m, getfig(subplt.o))

src/backends/qwt.jl

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
function _initialize_backend(::QwtPackage; kw...)
55
@eval begin
6+
warn("Qwt is no longer supported... many features will likely be broken.")
67
import Qwt
78
export Qwt
89
end

src/output.jl

+5
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,8 @@ gui(plt::PlottingObject = current()) = display(PlotsDisplay(), plt)
112112

113113
# override the REPL display to open a gui window
114114
Base.display(::Base.REPL.REPLDisplay, ::MIME"text/plain", plt::PlottingObject) = gui(plt)
115+
116+
# a backup for html... passes to svg
117+
function Base.writemime(io::IO, ::MIME"text/html", plt::PlottingObject)
118+
writemime(io, MIME("image/svg+xml"), plt)
119+
end

0 commit comments

Comments
 (0)