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

Scattergl markers are not rendered but you can hover over them #3751

Closed
rhamner opened this issue Apr 9, 2019 · 19 comments
Closed

Scattergl markers are not rendered but you can hover over them #3751

rhamner opened this issue Apr 9, 2019 · 19 comments
Assignees
Labels
bug something broken

Comments

@rhamner
Copy link

rhamner commented Apr 9, 2019

The behavior here is similar to a previous bug I hit (issue 2999) but that bug's reproducing case no longer reproduces for me so I think this might be the same behavior from a different issue.

If I plot a large number of markers with scattergl, it works fine. If I then plot a subset, it does not. The transition point seems to be ~100k markers. That is, once I plot more than ~100k, plotting below ~100k shows the issue.

Here is a really simple reproducing example:

https://codepen.io/rhamner/pen/XQpRbx

If I use 'scatter' instead of 'scattergl' it works fine, but our actual use case is much larger than 100k points so scatter doesn't work.

The browser generates hundreds of these warnings:

[.WebGL-00000080DCBEE1F0]GL ERROR :GL_INVALID_OPERATION : glDrawArrays: attempt to access out of range vertices in attribute 0

I'm using chrome Version 73.0.3683.103 (Official Build) (64-bit). This specific sample code does not show the issue in firefox, but I do hit the issue in firefox with our actual code and I'm not sure why.

@archmoj
Copy link
Contributor

archmoj commented Apr 9, 2019

our actual use case is much larger than 100k points so scatter doesn't work.
@rhamner it is close to how many points?

@rhamner
Copy link
Author

rhamner commented Apr 9, 2019

@archmoj on the order of 1M. The actual one where I noticed this originally was ~300k points dropping down to ~15k points.

@etpinard
Copy link
Contributor

etpinard commented Apr 9, 2019

Right the cross-over should be at 1e5 pts. Something must be up with point-cluster. Note that we never cluster x/y scattergl data below 1e5 pts.

if(hasTooManyPoints && (xa.type !== 'log' && ya.type !== 'log')) {
// FIXME: delegate this to webworker
stash.tree = cluster(positions);
} else {
var ids = stash.ids = new Array(len);
for(i = 0; i < len; i++) {
ids[i] = i;
}
}

@etpinard
Copy link
Contributor

etpinard commented Apr 9, 2019

More info -> gl-vis/regl-scatter2d#19

@rhamner
Copy link
Author

rhamner commented Apr 9, 2019

Scanning through that...if I understood correctly, newPlot will not show this issue? I tried it out in that codepen I included and the issue goes away. Is that a valid stopgap?

@wweitzel

This comment has been minimized.

@etpinard

This comment has been minimized.

@wweitzel

This comment has been minimized.

@etpinard

This comment has been minimized.

@wweitzel

This comment has been minimized.

@etpinard etpinard added the bug something broken label Apr 12, 2019
@etpinard
Copy link
Contributor

cc #2334

@etpinard
Copy link
Contributor

cc #3405

@archmoj
Copy link
Contributor

archmoj commented Jul 3, 2019

This issue appears to be (going to be) fixed (in the next release v.1.49.0) after bumping [email protected] which uses [email protected] in #3904.
Codepen

@etpinard
Copy link
Contributor

etpinard commented Jul 3, 2019

after bumping [email protected] which uses [email protected] in #3904.

I doubt it. We shouldn't be calling point-cluster from regl-scatter. Our call to point-cluster is here:

stash.tree = cluster(positions);

@archmoj
Copy link
Contributor

archmoj commented Jul 3, 2019

But that line is not called in the codepen demonstrating the issue.

@etpinard
Copy link
Contributor

etpinard commented Jul 3, 2019

But that line is not called in the codepen demonstrating the issue.

Right, because your https://codepen.io/MojtabaSamimi/pen/VJddPx has (only) 1e4 points. See https://codepen.io/etpinard/pen/EBRpqz which has 1e5 points - and appears buggy still.

@archmoj archmoj self-assigned this Oct 30, 2019
@archmoj
Copy link
Contributor

archmoj commented Oct 30, 2019

@rhamner
A candidate fix illustrated in this demo.

@archmoj
Copy link
Contributor

archmoj commented Oct 31, 2019

Closed by #4323 .

@archmoj archmoj closed this as completed Oct 31, 2019
@rhamner
Copy link
Author

rhamner commented Nov 1, 2019

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

4 participants