Skip to content

Commit

Permalink
added svg in pyplot; deprecate qwt; writemime backup for html
Browse files Browse the repository at this point in the history
  • Loading branch information
tbreloff committed Mar 9, 2016
1 parent ded9f33 commit fd4dd13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backends/pyplot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)


Expand All @@ -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))
Expand Down
1 change: 1 addition & 0 deletions src/backends/qwt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fd4dd13

Please sign in to comment.