Skip to content

Implement connectGaps - #361

Merged
etpinard merged 8 commits into
plotly:masterfrom
mikolalysenko:connect-gaps
Apr 1, 2016
Merged

Implement connectGaps#361
etpinard merged 8 commits into
plotly:masterfrom
mikolalysenko:connect-gaps

Conversation

@mikolalysenko

Copy link
Copy Markdown
Contributor

This PR solves #281

For example, the following data:

{
  "data": [{
    "type": "scatter3d",
    "mode": "lines",
    "x": [0, 1, 2, 3, 4, 5],
    "y": [0, 1, 2, 3, 4, 5],
    "z": [2, 1, null, null, 0, 3],
    "connectgaps": false
  }],
  "layout": {
    "title": "connect gaps test",
  }
}

Would produce the following plot:

screen shot 2016-03-25 at 4 25 48 pm

Gaps in line plots are implemented by inserting a pair of degenerate triangles into the triangle strip

@mikolalysenko

Copy link
Copy Markdown
Contributor Author

Sorry for the messy commit history. I merged in the middle which screwed up the rebase.

@etpinard

Copy link
Copy Markdown
Contributor

Ref commit in gl-line3d : gl-vis/gl-line3d@1e42375

Comment thread devtools/test_dashboard/test_gl3d.js Outdated
plots['connectgaps'] = require('@mocks/gl3d_scatter3d-connectgaps.json');
plots['tet'] = require('@mocks/gl3d_tet.json');
plots['surface_intensity'] = require('@mocks/gl3d_surface_intensity.json');
plots['connectgaps'] = require('@mocks/gl3d_scatter3d-connectgaps.json');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

duplicate.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

and this line should be:

plots['scatter3d-connectgaps'] = require('@mocks/gl3d_scatter3d-connectgaps.json');

so that the corresponding image baseline is displayed properly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

whoops! that screwed up when I rebased

@etpinard

Copy link
Copy Markdown
Contributor

@mikolalysenko Looking good. Thanks for doing this 🍻

We'll merge this in as soon as the minor edits ⏫ are done.

@etpinard

etpinard commented Apr 1, 2016

Copy link
Copy Markdown
Contributor

nicely done.

@etpinard
etpinard merged commit f382f46 into plotly:master Apr 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

Development

Successfully merging this pull request may close these issues.

2 participants