pgfplots display popup
This commit is contained in:
parent
514284e784
commit
d7098f77c2
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user