Created
February 3, 2014 23:02
-
-
Save mikolalysenko/8794214 to your computer and use it in GitHub Desktop.
Sketch of 3D plotting interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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