pgfplots display popup

This commit is contained in:
Thomas Breloff 2016-06-09 17:31:06 -04:00
parent 514284e784
commit d7098f77c2

View File

@ -311,9 +311,23 @@ function _writemime(io::IO, mime::MIME"application/pdf", plt::Plot{PGFPlotsBacke
# read it into io # read it into io
write(io, readall(open(fn))) write(io, readall(open(fn)))
# cleanup
PGFPlots.cleanup(plt.o)
end end
function _display(plt::Plot{PGFPlotsBackend}) function _display(plt::Plot{PGFPlotsBackend})
# prepare the object
_make_pgf_plot!(plt) _make_pgf_plot!(plt)
display(plt.o) pgfplt = PGFPlots.plot(plt.o)
# save an svg
fn = string(tempname(), ".svg")
PGFPlots.save(PGFPlots.SVG(fn), pgfplt)
# show it
open_browser_window(fn)
# cleanup
PGFPlots.cleanup(plt.o)
end end