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

dm.event() is broken #3564

Closed
basnijholt opened this issue Mar 19, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@basnijholt
Copy link
Contributor

commented Mar 19, 2019

Run in one cell

def plot_generator():
    while True:
        yield hv.Curve(np.random.rand(10))

dm = hv.DynamicMap(plot_generator(),
                   streams=[hv.streams.Stream.define('Next')()])
dm

then dm.event() has no effect and nothing appears in the JS console.

For now calling hv.streams.Stream.trigger(dm.streams) works.

Related: python-adaptive/adaptive#166

@philippjfr

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

Note that I suspect this happens only when none of the streams define any actual parameters.

basnijholt added a commit to python-adaptive/adaptive that referenced this issue Mar 19, 2019

basnijholt added a commit to python-adaptive/adaptive that referenced this issue Mar 19, 2019

basnijholt added a commit to python-adaptive/adaptive that referenced this issue Mar 20, 2019

@douglasmacdonald

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2019

def event(self, **kwargs):

In the tutorial, http://holoviews.org/user_guide/Responding_to_Events.html, I could not get this to work for hv.version '1.12.0'

for i in range(40):
    dmap.event()

However, the periodic example did work

dmap.periodic(0.1, 1000, timeout=3)

I had a snoop around the code and, when I tried the loop like this it worked

for i in range(40):
    #dmap.event
    hv.streams.Stream.trigger(dmap.streams) # I got this line from periodic call.

@philippjfr philippjfr added this to the v1.12.2 milestone Apr 29, 2019

basnijholt added a commit to python-adaptive/adaptive that referenced this issue May 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.