Histogram of dates in Plots.jl

Actually I’ve found an easier workaround: while histogram ignores formatters, they can be added to an existing histogram if it is plotted again. So:

plot(histogram(rand(Date(2000, 1, 1):Day(1):Date(2001, 1, 1), 100)),
    xformatter = x -> Dates.epochdays2date(x+365))

image

(Thanks for reminding me of the epochdays2date function!)

2 Likes