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

Correctly initialize comms and connect streams #842

Merged
merged 4 commits into from
Aug 31, 2016
Merged

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Aug 31, 2016

This PR ensures that only the top-level plot instance creates a Comm instance and then attaches the plot.refresh method as a _hidden_subscriber to the stream. A simple test I used:

posx = hv.streams.PositionX()
dmap = hv.DynamicMap(lambda x: hv.Image(np.random.rand(x+1,10)), kdims=[], streams=[posx])
dmap + hv.Image(np.random.rand(10,10))

image

for i in range(10):
    posx.update(x=i)

The plot updates in response to the position updates.

@jlstevens
Copy link
Contributor

Looks good. Merging.

@jlstevens jlstevens merged commit 697f0e8 into master Aug 31, 2016
@jbednar jbednar deleted the connect_streams branch September 1, 2016 10:52
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

Successfully merging this pull request may close these issues.

None yet

2 participants