fix display
This commit is contained in:
parent
37ff1a73ed
commit
eddf523d08
@ -1,9 +1,18 @@
|
|||||||
using PGFPlotsX: PGFPlotsX
|
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})
|
function _update_plot_object(plt::Plot{PGFPlotsXBackend})
|
||||||
plt.o = PGFPlotsX.Axis()
|
plt.o = PGFPlotsX.GroupPlot()
|
||||||
push!( plt.o, PGFPlotsX.Plot(PGFPlotsX.Coordinates(1:5,1:5)) )
|
|
||||||
|
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
|
end
|
||||||
|
|
||||||
function _show(io::IO, mime::MIME"image/svg+xml", plt::Plot{PGFPlotsXBackend})
|
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
|
end
|
||||||
|
|
||||||
function _display(plt::Plot{PGFPlotsXBackend})
|
function _display(plt::Plot{PGFPlotsXBackend})
|
||||||
|
# fn = string(tempname(),".svg")
|
||||||
|
# PGFPlotsX.pgfsave(fn, plt.o)
|
||||||
|
# open_browser_window(fn)
|
||||||
plt.o
|
plt.o
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user