fix display

This commit is contained in:
Simon Christ 2019-11-13 12:12:31 +01:00
parent 37ff1a73ed
commit eddf523d08

View File

@ -1,9 +1,18 @@
using PGFPlotsX: PGFPlotsX
# --------------------------------------------------------------------------------------
# display calls this and then _display
# display calls this and then _display, its called 3 times for plot(1:5)
function _update_plot_object(plt::Plot{PGFPlotsXBackend})
plt.o = PGFPlotsX.Axis()
push!( plt.o, PGFPlotsX.Plot(PGFPlotsX.Coordinates(1:5,1:5)) )
plt.o = PGFPlotsX.GroupPlot()
local axis
for sp in plt.subplots
axis = PGFPlotsX.Axis()
for series in series_list(sp)
series_plot = PGFPlotsX.Plot(PGFPlotsX.Coordinates(series[:x],series[:y]))
push!( axis, series_plot )
end
end
push!( plt.o, axis )
end
function _show(io::IO, mime::MIME"image/svg+xml", plt::Plot{PGFPlotsXBackend})
@ -23,5 +32,8 @@ function _show(io::IO, mime::MIME"application/x-tex", plt::Plot{PGFPlotsXBackend
end
function _display(plt::Plot{PGFPlotsXBackend})
# fn = string(tempname(),".svg")
# PGFPlotsX.pgfsave(fn, plt.o)
# open_browser_window(fn)
plt.o
end