Skip to content

Commit 501478f

Browse files
authored
BUG: plotting with non-nano TimedeltaIndex (#63237)
1 parent 945385d commit 501478f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,7 @@ Plotting
12491249
- Bug in :meth:`Series.plot` preventing a line and bar from being aligned on the same plot (:issue:`61161`)
12501250
- Bug in :meth:`Series.plot` preventing a line and scatter plot from being aligned (:issue:`61005`)
12511251
- Bug in :meth:`Series.plot` with ``kind="pie"`` with :class:`ArrowDtype` (:issue:`59192`)
1252+
- Bug in plotting with a :class:`TimedeltaIndex` with non-nanosecond resolution displaying incorrect labels (:issue:`63237`)
12521253

12531254
Groupby/resample/rolling
12541255
^^^^^^^^^^^^^^^^^^^^^^^^

pandas/plotting/_matplotlib/converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ def __init__(self, unit: TimeUnit = "ns"):
11071107
axis: Axis
11081108

11091109
@staticmethod
1110-
def format_timedelta_ticks(x, pos, n_decimals: int, exp: int) -> str:
1110+
def format_timedelta_ticks(x, pos, n_decimals: int, exp: int = 9) -> str:
11111111
"""
11121112
Convert seconds to 'D days HH:MM:SS.F'
11131113
"""

0 commit comments

Comments
 (0)