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

Regl-based scattergl and scatterpolargl traces #2258

Merged
merged 39 commits into from
Jan 18, 2018

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Jan 17, 2018

This PR is a big one 💪 🚀 🚨

About 99.99% of it is the fruit of @dy 's 6-month worth of work. @dy rewrote our scattergl trace type using regl. In brief, scattergl traces are now drawn in a single canvas -- no matter how many subplots there are on the graphs -- that sits above cartesian SVG axes. Reusing the SVG axes logic fixed about 10 bugs by itself. Plotting in a single canvas improves performance for multi-subplot graphs immensely as well as removing those annoying too many active WebGL contexts warnings. For more info on our new regl-based scattergl trace type, see #1869. For the sake of brevity, all that work was squashed into a single commit b64928d

The remaining 0.01% of this PR adds a new trace type: scatterpolargl which, as the name suggests, is a scatter trace type that'a plotted on polar subplots using WebGL. This new trace type doesn't bring much new code into the library, it simply combines logic from scattergl and scatterpolar on top of polar (SVG) subplots from #2200.

etpinard and others added 30 commits December 12, 2017 14:59
... not sure why this thing fails on older versions
    of Chrome. Manually testing this on Browserstack
    produces the correct result.
... in compare px test, so that they don't conflict
    with regl-based scattergl.
... not sure why they pass previously, as both tests have
    assert small displacements that don't result in relayout
    to equal the base ranges AFTER modifying it with large-enough
    displacements.
... by making 'gd' the first argument, some subplot object the 2nd
    and the module calcdata the 3rd.
@@ -561,7 +561,7 @@ function sceneUpdate(container, subplot) {
if(scene.fill2d) scene.fill2d.update(opts);
if(scene.scatter2d) scene.scatter2d.update(opts);
if(scene.line2d) scene.line2d.update(opts);
if(scene.error2d) scene.error2d.update([].push.apply(opts, opts));
if(scene.error2d) scene.error2d.update(opts.concat(opts));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this fix?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it fixes #2259 (comment)

Thanks.

xa.p2c(xpx - MAXDIST), ya.p2c(ypx + MAXDIST),
xa.p2c(xpx + MAXDIST), ya.p2c(ypx - MAXDIST)
Math.min(xl, xr), Math.min(yl, yr),
Math.max(xl, xr), Math.max(yl, yr)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this fix?

... which should make things more robust and lead to less
    intermittent ci failures
... this does help a little, those tests appear to pass more often
    on ci, but this doesn't work 100% of the time.

Something in a suite that get executed before
(before 'polar' alphabetically) must not be cleaning up correctly.
- now part of the open items (unfortunately) in:
  #2255
@alexcjohnson
Copy link
Collaborator

alexcjohnson commented Jan 18, 2018

@dy @etpinard you get a whole troupe for this one
💃 💃 💃 💃
💃 💃 💃 💃
💃 💃 💃 💃
💃 💃 💃 💃

@etpinard etpinard merged commit 46483f2 into master Jan 18, 2018
@etpinard etpinard deleted the regl-scattergl-scatterpolargl branch January 18, 2018 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants