hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

Color cycle mismatch with and without datashade=True

Open jlstevens opened this issue 3 years ago • 3 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-0000'.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, UTC]
SPY                      float64
NDAQ                     float64
dtype: object

The color cycles are mismatched with/without datashader usage:

image

jlstevens avatar Oct 13 '22 12:10 jlstevens

What happens if a color_key is specified explicitly? Do they still not match? Is it an issue of different defaults in the two cases?

jbednar avatar Oct 13 '22 18:10 jbednar

I believe the issue is with the defaults only and you can make them match by specifying color_key. Happy to double check this but I am pretty sure this is the case!

jlstevens avatar Oct 13 '22 20:10 jlstevens

If so, I think the non-Datashader default should be used in both cases.

jbednar avatar Oct 13 '22 22:10 jbednar