subplot annotations
This commit is contained in:
parent
d47e8c0f44
commit
7bf89d8614
@ -18,6 +18,7 @@ function Base.push!(pgfx_plot::PGFPlotsXPlot, item)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
|
||||||
|
# TODO: annotations! does not trigger _series_added ...
|
||||||
if !pgfx_plot.is_created
|
if !pgfx_plot.is_created
|
||||||
cols, rows = size(plt.layout.grid)
|
cols, rows = size(plt.layout.grid)
|
||||||
the_plot = PGFPlotsX.TikzPicture()
|
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))
|
pgfx_add_annotation!(axis, xi, yi, PlotText(str, fnt), pgfx_thickness_scaling(series))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# add subplot annotations
|
||||||
|
anns = sp.attr[:annotations]
|
||||||
|
for (xi,yi,txt) in anns
|
||||||
|
pgfx_add_annotation!(axis, xi, yi, txt)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if ispolar(sp)
|
if ispolar(sp)
|
||||||
axes = the_plot
|
axes = the_plot
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user