backend_object; pgfplots _update_plot_object fix
This commit is contained in:
parent
d892c57596
commit
6e3de26477
@ -70,9 +70,10 @@ export
|
|||||||
backend,
|
backend,
|
||||||
backends,
|
backends,
|
||||||
backend_name,
|
backend_name,
|
||||||
|
backend_object,
|
||||||
add_backend,
|
add_backend,
|
||||||
aliases,
|
aliases,
|
||||||
dataframes,
|
# dataframes,
|
||||||
|
|
||||||
Shape,
|
Shape,
|
||||||
text,
|
text,
|
||||||
|
|||||||
@ -239,7 +239,7 @@ end
|
|||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
function _make_pgf_plot!(plt::Plot)
|
function _update_plot_object(plt::Plot{PGFPlotsBackend})
|
||||||
plt.o = PGFPlots.Axis[]
|
plt.o = PGFPlots.Axis[]
|
||||||
for sp in plt.subplots
|
for sp in plt.subplots
|
||||||
# first build the PGFPlots.Axis object
|
# first build the PGFPlots.Axis object
|
||||||
@ -297,13 +297,10 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function _show(io::IO, mime::MIME"image/svg+xml", plt::Plot{PGFPlotsBackend})
|
function _show(io::IO, mime::MIME"image/svg+xml", plt::Plot{PGFPlotsBackend})
|
||||||
_make_pgf_plot!(plt)
|
|
||||||
show(io, mime, plt.o)
|
show(io, mime, plt.o)
|
||||||
end
|
end
|
||||||
|
|
||||||
function _show(io::IO, mime::MIME"application/pdf", plt::Plot{PGFPlotsBackend})
|
function _show(io::IO, mime::MIME"application/pdf", plt::Plot{PGFPlotsBackend})
|
||||||
_make_pgf_plot!(plt)
|
|
||||||
|
|
||||||
# prepare the object
|
# prepare the object
|
||||||
pgfplt = PGFPlots.plot(plt.o)
|
pgfplt = PGFPlots.plot(plt.o)
|
||||||
|
|
||||||
@ -320,7 +317,6 @@ end
|
|||||||
|
|
||||||
function _display(plt::Plot{PGFPlotsBackend})
|
function _display(plt::Plot{PGFPlotsBackend})
|
||||||
# prepare the object
|
# prepare the object
|
||||||
_make_pgf_plot!(plt)
|
|
||||||
pgfplt = PGFPlots.plot(plt.o)
|
pgfplt = PGFPlots.plot(plt.o)
|
||||||
|
|
||||||
# save an svg
|
# save an svg
|
||||||
|
|||||||
@ -193,7 +193,7 @@ function _plot!(plt::Plot, d::KW, args::Tuple)
|
|||||||
|
|
||||||
# info(3)
|
# info(3)
|
||||||
# map(DD, kw_list)
|
# map(DD, kw_list)
|
||||||
|
|
||||||
for kw in kw_list
|
for kw in kw_list
|
||||||
sp::Subplot = kw[:subplot]
|
sp::Subplot = kw[:subplot]
|
||||||
# idx = get_subplot_index(plt, sp)
|
# idx = get_subplot_index(plt, sp)
|
||||||
@ -251,7 +251,7 @@ function prepare_output(plt::Plot)
|
|||||||
_update_plot_object(plt)
|
_update_plot_object(plt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function prepared_object(plt::Plot)
|
function backend_object(plt::Plot)
|
||||||
prepare_output(plt)
|
prepare_output(plt)
|
||||||
plt.o
|
plt.o
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user