Issue:
I am trying to plot data with a pandas time delta index with negative time delta values on the x-axis using hvplot or holoviews (bokeh backend).
The labels are just integers, and seem to be in milliseconds.
I want them to be formatted in a friendlier format such as HH:MM:SS
EXAMPLE
import pandas as pd
import numpy as np
import hvplot.pandas
x = pd.timedelta_range(start=0, freq='S', periods=11) - pd.Timedelta('5S')
y = np.arange(len(x))
df = pd.DataFrame({'y': y}, index=x)
df.hvplot.line(rot=20)
Output:
I expected the x axis to be -00:00:04 -00:00:04 00:00:00 00:00:02 00:00:04
or at least in seconds, this seems to be milliseconds.
What I tried
using the df create above:
from bokeh.models.formatters import NumeralTickFormatter
df.hvplot.line(xformatter=NumeralTickFormatter(format="00:00:00"), rot=20)
Output:
Idk what happened here with the xlabels but they dont really make any sense.
Using DatetimeTickFormatter:
from bokeh.models.formatters import DatetimeTickFormatter
df.hvplot.line(rot=20, xformatter=DatetimeTickFormatter())
Does not work unfortunatelt: No negative values: - 00:00:02 becomes 58s


