annotations over marksers in pgfplotsx backend (#3957)

This commit is contained in:
chwons 2021-11-29 17:36:08 +09:00 committed by GitHub
parent 9305cd41ab
commit 06bc99ef68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,6 +162,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
"anchor" => "north west", "anchor" => "north west",
"xshift" => string(dx), "xshift" => string(dx),
"yshift" => string(-dy), "yshift" => string(-dy),
"clip mode" => "individual",
) )
sp_width > 0 * mm ? push!(axis_opt, "width" => string(axis_width)) : nothing sp_width > 0 * mm ? push!(axis_opt, "width" => string(axis_width)) : nothing
sp_height > 0 * mm ? push!(axis_opt, "height" => string(axis_height)) : nothing sp_height > 0 * mm ? push!(axis_opt, "height" => string(axis_height)) : nothing
@ -1055,7 +1056,11 @@ function pgfx_add_annotation!(
push!( push!(
o, o,
join([ join([
"\\node", raw"""
\begin{scope}
\clip \pgfextra{\pgfplotspathaxisoutline};
\node
""",
sprint( sprint(
PGFPlotsX.print_tex, PGFPlotsX.print_tex,
merge( merge(
@ -1074,6 +1079,7 @@ function pgfx_add_annotation!(
), ),
), ),
string(" at (", cs, x, ",", y, ") {", val.str, "};"), string(" at (", cs, x, ",", y, ") {", val.str, "};"),
"\\end{scope}",
]), ]),
) )
end end