Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Holomap of a stack of datashader rasterized Points lose dynamics after converting to layout #5965

Open
1 task done
kanglcn opened this issue Oct 28, 2023 · 1 comment
Open
1 task done

Comments

@kanglcn
Copy link

kanglcn commented Oct 28, 2023

ALL software version info

holoviews 1.18.0
datashader 0.15.2

Description of expected behavior and the observed behavior

I have a holomap created with a stack of rasterized Points. The direct plotted holomap is dynamically rasterized while the layout of it isn’t.

Complete, minimal, self-contained example code that reproduces the issue

import numpy as np
import pandas as pd
import holoviews as hv
hv.extension('bokeh')
import holoviews.operation.datashader as hd
import datashader as ds

lon = np.array([8.75,8.76,8.77])
lat = np.array([46.1,46.2,46.3])
index = np.array([0,1,2])
dates = np.arange(4)
temp = np.random.random((4,3))

point_stack = {date: hv.Points(pd.DataFrame({'lon':lon,'lat':lat,'temp':temp[i,:]}), kdims=['lon','lat'], vdims=['temp']) for i, date in enumerate(dates)}

hmap = hv.HoloMap(point_stack, kdims='Dates')
hmap = hd.dynspread(hd.rasterize(hmap, aggregator=ds.first('temp'),vdim_prefix=''))

hmap # it plot perfectly

hmap.layout() # it loses the dynamics

Stack traceback and/or browser JavaScript console output

No traceback.

Screenshots or screencasts of the bug in action

image

  • I may be interested in making a pull request to address this, but my understanding to this package is very shallow.
@jbednar
Copy link
Member

jbednar commented Oct 28, 2023

I was able to reproduce this, but I'm not sure what's needed to fix it. My best guess isthat the RangeXY streams are being discarded by .layout().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants