Hmm, AbsoluteOptions
gives useless result with DateListPlot
. A workaround is to get the ticks from a ListPlot
and to feed them to DateListPlot
:
data = {{{2017, 1, 1}, 1}, {{2017, 2, 1}, 2}};
nonDatePlot = ListPlot[data[[All, -1]]];
tks = Ticks /. AbsoluteOptions[nonDatePlot];
modifiedTks =
tks[[2]] /. {x_Real, tk_Real, rest___} :> {x,
Rationalize[tk/Pi, Pi/10000] Pi, rest};
DateListPlot[data,
FrameTicks -> {{modifiedTks, Automatic}, Automatic}]