Question Details

No question body available.

Tags

python pandas plotly

Answers (1)

March 19, 2026 Score: 4 Rep: 3,934 Quality: Medium Completeness: 80%

Plotly does not seem to like these "HH:MM" time strings too much. I can reproduce your issue easily with "problematic times" such as 18:41, which gets placed at the very end of the x-axes.

I would have thought that plotly treats these time strings as "categorical data" (because it's just a string), and would lay it out in the order in which it appears in the underlying data. But maybe during splitting the data by ride, the order gets mixed up again.

One workaround is to convert these "time strings" to datetime, which prevents plotly from treating this as categorical data:

self.frame['lastupdated'] = pd.todatetime(self.frame['lastupdated'], format = '%H:%M')