From 6bc38eaea3f42e146a06fc93fda5716fca6a3be2 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sat, 18 Apr 2020 19:01:42 +0200 Subject: [PATCH] fix annotate! shorthands --- src/shorthands.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/shorthands.jl b/src/shorthands.jl index 230806a4..0c9f626a 100644 --- a/src/shorthands.jl +++ b/src/shorthands.jl @@ -438,8 +438,9 @@ julia> plot(1:10) julia> annotate!([(7,3,"(7,3)"),(3,7,text("hey", 14, :left, :top, :green))]) ``` """ -annotate!(anns...; kw...) = plot!(; annotation = collect(anns), kw...) -annotate!(anns::AVec{T}; kw...) where {T<:Tuple} = plot!(; annotation = anns, kw...) +annotate!(anns...; kw...) = plot!(; annotation = anns, kw...) +annotate!(anns::Tuple...; kw...) = plot!(; annotation = collect(anns), kw...) +annotate!(anns::AVec{<:Tuple}; kw...) = plot!(; annotation = anns, kw...) "Flip the current plots' x axis" xflip!(flip::Bool = true; kw...) = plot!(; xflip = flip, kw...)