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

Simple streams example not working #6098

Closed
smutch opened this issue Feb 5, 2024 · 0 comments · Fixed by #6099
Closed

Simple streams example not working #6098

smutch opened this issue Feb 5, 2024 · 0 comments · Fixed by #6099
Labels
tag: backend: bokeh type: bug Something isn't correct or isn't working

Comments

@smutch
Copy link

smutch commented Feb 5, 2024

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)

Mac OS 14.3
Arc Browser Version 1.28.0, Chromium Engine Version 121.0.6167.139

holoviews 1.18.1 pyhd8ed1ab_0 3.2 MiB conda holoviews-1.18.1-pyhd8ed1ab_0.conda
jupyterlab 4.0.12 pyhd8ed1ab_0 5.4 MiB conda jupyterlab-4.0.12-pyhd8ed1ab_0.conda
numpy 1.26.3 py312h8442bc7_0 5.8 MiB conda numpy-1.26.3-py312h8442bc7_0.conda
pandas 2.2.0 py312h88edd18_0 13.8 MiB conda pandas-2.2.0-py312h88edd18_0.conda
pyviz_comms 3.0.0 pyhd8ed1ab_0 46.5 KiB conda pyviz_comms-3.0.0-pyhd8ed1ab_0.conda

Description of expected behavior and the observed behavior

The boundsx stream example from the documentation doesn't update when bounds are selected.

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

import numpy as np
import holoviews as hv
import pandas as pd

hv.extension("bokeh")

n=200
xs = np.linspace(0, 1, n)
ys = np.cumsum(np.random.randn(n))
df = pd.DataFrame({'x': xs, 'y': ys})
curve = hv.Curve(df)

def make_from_boundsx(boundsx):
    sub = df.set_index('x').loc[boundsx[0]:boundsx[1]]
    return hv.Table(sub.describe().reset_index().values, 'stat', 'value')

dmap = hv.DynamicMap(make_from_boundsx, streams=[hv.streams.BoundsX(source=curve, boundsx=(0,0))])

curve.opts(tools=['xbox_select']) + dmap

Stack traceback and/or browser JavaScript console output

No relevant errors that I can see.

Screenshots or screencasts of the bug in action

Screenshot 2024-02-05 at 16 53 55

After selecting a subset of the plot using the boundsx tool, the table does not update.

@hoxbro hoxbro added the type: bug Something isn't correct or isn't working label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tag: backend: bokeh type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants