This commit is contained in:
Simon Christ 2019-11-26 18:55:44 +01:00
parent 0b71f55b29
commit 0d2ccfddfb

View File

@ -31,6 +31,7 @@ Base.@kwdef mutable struct PGFPlotsXPlot
end
end
## end user utility functions
function pgfx_axes(pgfx_plot::PGFPlotsXPlot)
gp = pgfx_plot.the_plot.elements[1].elements[1]
return gp isa PGFPlotsX.GroupPlot ? gp.contents : gp
@ -44,6 +45,7 @@ function pgfx_preamble(pgfx_plot::Plot{PGFPlotsXBackend})
pgfx_plot.attr[:tex_output_standalone] = old_flag
preamble
end
##
function surface_to_vecs(x::AVec, y::AVec, s::Union{AMat, Surface})
a = Array(s)
@ -58,12 +60,6 @@ function surface_to_vecs(x::AVec, y::AVec, s::Union{AMat, Surface})
return xn, yn, zn
end
Base.display(pgfx_plot::PGFPlotsXPlot) = display(pgfx_plot.the_plot)
function Base.show(io::IO, mime::MIME, pgfx_plot::PGFPlotsXPlot)
show(io::IO, mime, pgfx_plot.the_plot)
end
function Base.push!(pgfx_plot::PGFPlotsXPlot, item)
push!(pgfx_plot.the_plot, item)
end
@ -803,11 +799,6 @@ function _show(io::IO, mime::MIME{Symbol("application/x-tex")}, plt::Plot{PGFPlo
PGFPlotsX.print_tex(io, plt.o.the_plot, include_preamble = plt.attr[:tex_output_standalone])
end
Base.show(io::IO, ::MIME{Symbol("text/plain")}, plt::Plot{PGFPlotsXBackend}) = show(io, plt)
function Base.show(io::IO, plt::Plot{PGFPlotsXBackend}) display(PGFPlotsX.PGFPlotsXDisplay(), plt.o.the_plot)
end
function _display(plt::Plot{PGFPlotsXBackend})
display(PGFPlotsX.PGFPlotsXDisplay(), plt.o.the_plot)
end