Skip to content Skip to sidebar Skip to footer

Datetime X Axis In Bokeh.charts.area

Why I plot my data with a datetime series as x axis, it is interpreted as a datetime value, but the wrong one: my 2016 times are interpreted as milliseconds after 1970-1-1. Code:

Solution 1:

The problem was the from __future__ import unicode statement.* Removing the line fixed the problem.

The core issue is that the the x='date' keyword argument must be bytes. Otherwise bokeh will not find the key in the dataframe. It does not show a warning or error in this case, it just silently replaces it with a numerical index (0, 1, 2, 3), which is interpreted as milliseconds by the date axis.


* Left out of the original question, because the same problem also surfaced after some pip confusion with leftover .egg-info directories.

Post a Comment for "Datetime X Axis In Bokeh.charts.area"