From 06bc99ef68dca50fd3f91cadff0b5d210ad3fdbf Mon Sep 17 00:00:00 2001 From: chwons <86314678+chwons@users.noreply.github.com> Date: Mon, 29 Nov 2021 17:36:08 +0900 Subject: [PATCH] annotations over marksers in pgfplotsx backend (#3957) --- src/backends/pgfplotsx.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index f9d839c6..dc35c8aa 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -162,6 +162,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend}) "anchor" => "north west", "xshift" => string(dx), "yshift" => string(-dy), + "clip mode" => "individual", ) sp_width > 0 * mm ? push!(axis_opt, "width" => string(axis_width)) : nothing sp_height > 0 * mm ? push!(axis_opt, "height" => string(axis_height)) : nothing @@ -1055,7 +1056,11 @@ function pgfx_add_annotation!( push!( o, join([ - "\\node", + raw""" + \begin{scope} + \clip \pgfextra{\pgfplotspathaxisoutline}; + \node + """, sprint( PGFPlotsX.print_tex, merge( @@ -1074,6 +1079,7 @@ function pgfx_add_annotation!( ), ), string(" at (", cs, x, ",", y, ") {", val.str, "};"), + "\\end{scope}", ]), ) end