You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The strftime format does not support the %6f notation. This needs to be %f, otherwise the result would be either a literal '%6f' in the output or a ValueError (invalid format string).
Code Sample, a copy-pastable example if possible
Problem description
The TimeFormatter code has several issues. The first is here:
pandas/pandas/plotting/_converter.py
Line 113 in 4fce784
ms
needs to be multiplied by 1e3, otherwise we'd be subtracting milliseconds from microseconds.The next problem is here:
pandas/pandas/plotting/_converter.py
Line 118 in 4fce784
The strftime format does not support the
%6f
notation. This needs to be%f
, otherwise the result would be either a literal '%6f' in the output or a ValueError (invalid format string).pandas/pandas/plotting/_converter.py
Line 120 in 4fce784
Same problems, plus: '%f' means microseconds for strftime(),
%3f
cannot turn this into milliseconds.And the last one:
pandas/pandas/plotting/_converter.py
Line 122 in 4fce784
This timestamp is missing the milliseconds entirely. (Assuming the fix to the microsecond calculation mentioned above.)
Expected Output
Correctly formatted time stamp strings as tick labels.
Solution Approaches
What do you think? I can set up a pull request for option 3 if that's the preferred solution.
The text was updated successfully, but these errors were encountered: