From 985d43bf4ca293b98a39fd60461d6826e40ef228 Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Tue, 26 Nov 2019 18:55:44 +0100 Subject: [PATCH] fix show --- src/backends/pgfplotsx.jl | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index 172c4470..b3007bc7 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -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