From 26af108979e713b4b50fd10ed652c2f60bb8f64a Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Wed, 18 Mar 2020 15:01:00 +0100 Subject: [PATCH] move grid line to the back --- src/backends/pgfplotsx.jl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index d97ce032..5552f133 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -140,7 +140,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend}) "fill" => bgc_inside, "opacity" => bgc_inside_a, ), - # "axis on top" => nothing, + "axis on top" => nothing, # "framed" => nothing, # These are for layouting "anchor" => "north west", @@ -1035,11 +1035,15 @@ function pgfx_axis!(opt::PGFPlotsX.Options, sp::Subplot, letter) ) push!( opt, - string(letter, " grid style") => pgfx_linestyle( - pgfx_thickness_scaling(sp) * axis[:gridlinewidth], - axis[:foreground_color_grid], - axis[:gridalpha], - axis[:gridstyle], + "set layers" => nothing, + string(letter, " grid style") => push!( + pgfx_linestyle( + pgfx_thickness_scaling(sp) * axis[:gridlinewidth], + axis[:foreground_color_grid], + axis[:gridalpha], + axis[:gridstyle], + ), + "/pgfplots/on layer" => "axis grid" ), ) end