-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Selection1D doesn't support datashaded plots #6436
Comments
Works with specific tools streams though import holoviews as hv
import pandas as pd
from holoviews.operation.datashader import datashade
def subset_points(bounds):
if bounds:
df_subset = df_points[
(df_points["x"] > bounds[0])
& (df_points["x"] < bounds[2])
& (df_points["y"] > bounds[1])
& (df_points["y"] < bounds[3])
]
return hv.Points(df_subset, kdims=["x", "y"])
else:
return hv.Points(df_points, kdims=["x", "y"])
df_points = pd.DataFrame(np.random.randn(1000, 2), columns=["x", "y"])
points = hv.Points(df_points, kdims=["x", "y"])
ds_points = datashade(points)
sel_points = hv.DynamicMap(
subset_points,
streams=[hv.streams.BoundsXY(source=ds_points)],
)
(
ds_points.opts(
tools=["box_select"],
active_tools=["box_select"],
)
+ sel_points
) |
This issue has been mentioned on HoloViz Discourse. There might be relevant details there: |
This doesn't seem super surprising really, a datashaded plot does not have 1D indices and computing them is potentially quite expensive. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nothing triggers
The text was updated successfully, but these errors were encountered: