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

Cannot update data points with quickquiver/quickscatter, but can for quiver/scatter #254

Open
GenevieveBuckley opened this issue May 27, 2019 · 0 comments

Comments

@GenevieveBuckley
Copy link
Contributor

The markdown README file in ipyvolume shows a screencast example of a quiver plot being updated by directly altering the attributes quiver.x, quiver.y, etc.

I can't do the same thing for quickquiver() or quickscatter() plots. Is this expected behaviour?

Version numbers
Python 3.6
ipyvolume - 0.5.1
ipywidgets - 7.4.2
ipywebrtc - 0.4.3
pythreejs - 2.0.2
ipython - 7.5.0
Chrome (latest, up to date) - Version 74.0.3729.169 (Official Build) (64-bit)

Works

import numpy as np
import ipyvolume as ipv
x, y, z = np.random.random((3, 100))
figure = ipv.figure()
myplot = ipv.scatter(x, y, z)
ipv.show()

Then when I run this...

new_x, new_y, new_z = np.random.random((3, 100))
myplot.x = new_x
myplot.y = new_y
myplot.z = new_z

... all the points update on the plot.

Doesn't work

import numpy as np
import ipyvolume as ipv
x, y, z = np.random.random((3, 100))
myplot = ipv.quickscatter(x, y, z)
ipv.show()

Then when I run this...

new_x, new_y, new_z = np.random.random((3, 100))
myplot.x = new_x
myplot.y = new_y
myplot.z = new_z

... nothing happens to the plot.

I don't see any python errors.

Oddly there is a javascript error or warning for the first, working example, but NOT the second non-working example.

3three.js?v=20190527164443:294 THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.

I do see a lot of javascript deprecation warnings, but I think they're irrelevant to this.

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

No branches or pull requests

1 participant