-
Notifications
You must be signed in to change notification settings - Fork 463
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
ScatterGL, a million scatter points using WebGL #661
Conversation
This is really cool! |
8268b15
to
36e1209
Compare
just FYI, I'm getting the following trace after the plot in the second input:
It doesn't affect functionality though (as of commit |
I truly like the implementation. This is just to mention, that bqplot/examples/Advanced Plotting/Animations.ipynb seems not to be working with this branch. |
36e1209
to
59d7a87
Compare
1dd29c2
to
c1cca50
Compare
577e5ac
to
b80a48d
Compare
I've merged locally #684, #630, #696 (
(with the master branch of The above referenced example (for the curious like me: the comment is about WIP, it may not be related to a finished release) |
5f7b4a0
to
da4723d
Compare
d539f6b
to
bf1af7a
Compare
db4c293
to
37455c0
Compare
Did some rebasing and splitting of the WebGL part to a separate branch (#714). The Animation notebook should run (although the widget state should be removed first from that notebook). |
New finding: |
The issue with chrome exists only when the dev console is open, which means that profiling (which opens de dev console) gives a distorted performance. |
3bdd1bd
to
41f15ad
Compare
f6008b2
to
fb0558b
Compare
5e000f7
to
81f4c40
Compare
@maartenbreddels On a vaguely related point, I created a set of linked plots to visualise and interactively edit 8 dimensions. It was just for fun (sad I know). Basically, it involves jslinking the skew, rotation, color, skew and opacity attributes with the x and y attributes. The animated gif shows this implimented with the standard Scatter mark. With 25 points it started to get a little sluggish. Would the ScatterMega handle many more points for this type of linked plots? Would love to see this PR in BQplot master sometime soon :D |
@maartenbreddels I quickly added a "cross" implementation in the shaders.
EDIT: The visual aspect is fixed |
We are not taking the |
bqplot/marks.py
Outdated
@@ -522,8 +522,9 @@ class _ScatterBase(Mark): | |||
'opacity': {'dimension': 'opacity'}, | |||
'rotation': {'dimension': 'rotation'} | |||
}).tag(sync=True) | |||
default_opacities = List(trait=Float(1.0, min=0, max=1, allow_none=True))\ | |||
.tag(sync=True, display_name='Opacities') | |||
default_opacities = Array(None, allow_none=True)\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure, but I think this change breaks the default_opacities
in the default Scatter implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed c167c2a
d711e83
to
3c45439
Compare
d8486c1
to
9a82876
Compare
Clean dead code and clean fragment shader
9a82876
to
e7020f5
Compare
Remove GLAttribute class which makes lots of copies and recreate each and every attribute buffer on every update (e.g. changing the `x` value was triggering an `update_geometry` which was triggering the creation of the `x`, `x_previous`, `y`, `y_previous`, `color`, `size`, `size_previous`, `rotation`, `rotation_previous`... buffers). Creating a new AttributeBuffer means that it needs to be sent to the GPU, and that is a slow operation. Now the AttributeBuffers are created only once, and changing the `x` value only triggers a change on the `x` and `x_previous` AttributeBuffers.
e7020f5
to
9147d0f
Compare
9147d0f
to
6ffaadf
Compare
This is good to go I think! |
This continues #630, not sure what the best strategy is, history wise etc.cc @astrofrog
For https://github.com/glue-viz/glue-jupyter we need bqplot to handle larger scatter plots, say up to 100k-1M. This PR shows it is possible to do using WebGL (based on ipyvolume code), and I think a first good attempt. It doesn't support yet all features the Scatter mark has, for instance, only linear scales.
The demo shows it runs pretty smooth, except that at 1 million, the non-binary serialization causes quite a lag.
![scattermega_example](https://user-images.githubusercontent.com/1765949/41468223-878129c4-70a9-11e8-8998-d87f0a06520b.gif)