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

@jlstevens jlstevens commented Aug 31, 2016

Looks good. Merging.

@jlstevens jlstevens merged commit 697f0e8 into master Aug 31, 2016
4 checks passed
4 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.2%) to 69.31%
Details
@philippjfr
s3-reference-data-cache Test data is cached.
Details
@jbednar jbednar deleted the connect_streams branch Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants