Skip to content

Commit

Permalink
allow passing tuple to series_annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Aug 2, 2021
1 parent 2df85eb commit 610b251
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 141 deletions.
4 changes: 2 additions & 2 deletions src/args.jl
Original file line number Diff line number Diff line change
Expand Up @@ -996,9 +996,9 @@ function processFontArg!(plotattributes::AKW, fontname::Symbol, arg)
elseif arg == :center
plotattributes[Symbol(fontname, :halign)] = :hcenter
plotattributes[Symbol(fontname, :valign)] = :vcenter
elseif arg in (:hcenter, :left, :right)
elseif arg _haligns
plotattributes[Symbol(fontname, :halign)] = arg
elseif arg in (:vcenter, :top, :bottom)
elseif arg _valigns
plotattributes[Symbol(fontname, :valign)] = arg
elseif T <: Colorant
plotattributes[Symbol(fontname, :color)] = arg
Expand Down
1 change: 1 addition & 0 deletions src/backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function text_size(lablen::Int, sz::Number, rot::Number = 0)
width, height
end
text_size(lab::AbstractString, sz::Number, rot::Number = 0) = text_size(length(lab), sz, rot)
text_size(lab::PlotText, sz::Number, rot::Number = 0) = text_size(length(lab.str), sz, rot)

# account for the size/length/rotation of tick labels
function tick_padding(sp::Subplot, axis::Axis)
Expand Down
Loading

0 comments on commit 610b251

Please sign in to comment.