From 018783b27e635159c6dad173df8120db587e8126 Mon Sep 17 00:00:00 2001 From: chwons <86314678+chwons@users.noreply.github.com> Date: Sat, 27 Nov 2021 02:44:24 +0900 Subject: [PATCH] annotations over marksers in pgfplotsx backend --- 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 d6a6b5e3..56645eb4 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