Merge pull request #2522 from wfrgra/time_annotation
Fix for #2349. Converts TimeTypes in annotations to numbers to allow their placement
This commit is contained in:
commit
4c839837d3
@ -595,6 +595,8 @@ function process_annotation(sp::Subplot, xs, ys, labs, font = font())
|
||||
ylength = length(methods(length, (typeof(ys),))) == 0 ? 1 : length(ys)
|
||||
for i in 1:max(xlength, ylength, length(labs))
|
||||
x, y, lab = _cycle(xs, i), _cycle(ys, i), _cycle(labs, i)
|
||||
x = typeof(x) <: TimeType ? Dates.value(x) : x
|
||||
y = typeof(y) <: TimeType ? Dates.value(y) : y
|
||||
if lab == :auto
|
||||
alphabet = "abcdefghijklmnopqrstuvwxyz"
|
||||
push!(anns, (x, y, text(string("(", alphabet[sp[:subplot_index]], ")"), font)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user