hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Time offsets not handled with datashade=True

Open jlstevens opened this issue 2 years ago • 1 comments

This issue is one of a number that relate to datashader support of timeseries.

>>> hv.__version__, bokeh.__version__, ds.__version__, panel.__version__, hvplot.__version__
('1.15.1', '2.4.3', '0.14.2', '0.13.1', '0.8.1')
>>> timestamps = [pd.Timestamp('2022-04-01 0{0}:00:00-0400'.format(hour)) for hour in range(10)] 
>>> df = pd.DataFrame({'timestamp':timestamps, 'SPY':np.random.rand(10), 'NDAQ':np.random.rand(10)})
>>> df.dtypes
timestamp    datetime64[ns, pytz.FixedOffset(-240)]
SPY                                         float64
NDAQ                                        float64
dtype: object

Here is the difference before using datashade=True and after:

image

(Note that the color cycles are mismatched as reported in https://github.com/holoviz/hvplot/issues/934)

This is probably because offsets are not handled when converted datetimes to integer in datashader. I expect this issue may need to be moved to the datashader repo later...

jlstevens avatar Oct 13 '22 12:10 jlstevens

HoloViews or hvPlot seems like the right repo, because Datashader doesn't process datetimes; seems like something to handle in the conversion before Datashader.

jbednar avatar Oct 13 '22 22:10 jbednar