subplot annotations

This commit is contained in:
Simon Christ 2019-11-21 16:46:15 +01:00
parent f5cbb1e341
commit 6378f88ba9

View File

@ -18,6 +18,7 @@ function Base.push!(pgfx_plot::PGFPlotsXPlot, item)
end
function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
# TODO: annotations! does not trigger _series_added ...
if !pgfx_plot.is_created
cols, rows = size(plt.layout.grid)
the_plot = PGFPlotsX.TikzPicture()
@ -180,6 +181,11 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
pgfx_add_annotation!(axis, xi, yi, PlotText(str, fnt), pgfx_thickness_scaling(series))
end
end
# add subplot annotations
anns = sp.attr[:annotations]
for (xi,yi,txt) in anns
pgfx_add_annotation!(axis, xi, yi, txt)
end
end
if ispolar(sp)
axes = the_plot