From 7acb5a4bdb0497877b4d214c0cc1a05a8d9bfcf7 Mon Sep 17 00:00:00 2001 From: Michael Krabbe Borregaard Date: Wed, 2 Jan 2019 17:39:28 +0100 Subject: [PATCH] allow annotations to take a tuple and pass it to text --- src/components.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components.jl b/src/components.jl index 46fc0f7d..f1f27dc4 100644 --- a/src/components.jl +++ b/src/components.jl @@ -554,7 +554,7 @@ function process_annotation(sp::Subplot, xs, ys, labs, font = font()) alphabet = "abcdefghijklmnopqrstuvwxyz" push!(anns, (x, y, text(string("(", alphabet[sp[:subplot_index]], ")"), font))) else - push!(anns, (x, y, isa(lab, PlotText) ? lab : text(lab, font))) + push!(anns, (x, y, isa(lab, PlotText) ? lab : isa(lab, Tuple) ? text(lab...) : text(lab, font))) end end anns @@ -569,7 +569,7 @@ function process_annotation(sp::Subplot, positions::Union{AVec{Symbol},Symbol}, alphabet = "abcdefghijklmnopqrstuvwxyz" push!(anns, (pos, text(string("(", alphabet[sp[:subplot_index]], ")"), font))) else - push!(anns, (pos, isa(lab, PlotText) ? lab : text(lab, font))) + push!(anns, (pos, isa(lab, PlotText) ? lab : isa(lab, Tuple) ? text(lab...) : text(lab, font))) end end anns