Skip to content

Instantly share code, notes, and snippets.

@mikolalysenko
Created February 3, 2014 23:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikolalysenko/8794214 to your computer and use it in GitHub Desktop.
Save mikolalysenko/8794214 to your computer and use it in GitHub Desktop.
Sketch of 3D plotting interface
var createViewer = require("plotly-viewer")
var createSurfacePlot = require("plotly-surface-plot")
var createAxes = require("plotly-axes")
var viewer = createViewer()
var surface
var axes
viewer.on("plotly-init", function() {
//viewer.container = div element that you can stick in page somewhere
//Create axes
axes = createAxes(viewer)
//Create surface plot
surface = createSurfacePlot(viewer, data)
//.. add other stuff here ...
})
// To update the data, you would do something like:
//
// surface.data.set( [ ... ] )
//
// Or:
//
// axes.bounds[0] = [0,0,0]
// axes.bounds[1] = [10,10,10]
//
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment