Created
June 14, 2016 23:41
-
-
Save anonymous/76d1b6095e84630c23d552abdb9d5849 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/mepatowuvo
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script src='http://www.numericjs.com/lib/numeric-1.2.6.min.js'> | |
| </script> | |
| <script src='https://cdn.plot.ly/plotly-latest.min.js'></script> | |
| <div id="potato"></div> | |
| <script id="jsbin-javascript"> | |
| var intensity = numeric.linspace(0,1,12); | |
| var data = [{ | |
| type: "mesh3d", | |
| x: [0, 0, 1, 1, 0, 0, 1, 1], | |
| y: [0, 1, 1, 0, 0, 1, 1, 0], | |
| z: [0, 0, 0, 0, 1, 1, 1, 1], | |
| i: [7, 0, 0, 0, 4, 4, 6, 6, 4, 0, 3, 2], | |
| j: [3, 4, 1, 2, 5, 6, 5, 2, 0, 1, 6, 3], | |
| k: [0, 7, 2, 3, 6, 7, 1, 1, 5, 5, 7, 6], | |
| intensity: intensity, | |
| colorscale: [ | |
| [0, 'rgb(255, 0, 0)'], | |
| [0.5, 'rgb(0, 255, 0)'], | |
| [1, 'rgb(0, 0, 255)'] | |
| ] | |
| } | |
| ]; | |
| Plotly.plot('potato', data, {}); | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var intensity = numeric.linspace(0,1,12); | |
| var data = [{ | |
| type: "mesh3d", | |
| x: [0, 0, 1, 1, 0, 0, 1, 1], | |
| y: [0, 1, 1, 0, 0, 1, 1, 0], | |
| z: [0, 0, 0, 0, 1, 1, 1, 1], | |
| i: [7, 0, 0, 0, 4, 4, 6, 6, 4, 0, 3, 2], | |
| j: [3, 4, 1, 2, 5, 6, 5, 2, 0, 1, 6, 3], | |
| k: [0, 7, 2, 3, 6, 7, 1, 1, 5, 5, 7, 6], | |
| intensity: intensity, | |
| colorscale: [ | |
| [0, 'rgb(255, 0, 0)'], | |
| [0.5, 'rgb(0, 255, 0)'], | |
| [1, 'rgb(0, 0, 255)'] | |
| ] | |
| } | |
| ]; | |
| Plotly.plot('potato', data, {});</script></body> | |
| </html> |
This file contains hidden or 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 intensity = numeric.linspace(0,1,12); | |
| var data = [{ | |
| type: "mesh3d", | |
| x: [0, 0, 1, 1, 0, 0, 1, 1], | |
| y: [0, 1, 1, 0, 0, 1, 1, 0], | |
| z: [0, 0, 0, 0, 1, 1, 1, 1], | |
| i: [7, 0, 0, 0, 4, 4, 6, 6, 4, 0, 3, 2], | |
| j: [3, 4, 1, 2, 5, 6, 5, 2, 0, 1, 6, 3], | |
| k: [0, 7, 2, 3, 6, 7, 1, 1, 5, 5, 7, 6], | |
| intensity: intensity, | |
| colorscale: [ | |
| [0, 'rgb(255, 0, 0)'], | |
| [0.5, 'rgb(0, 255, 0)'], | |
| [1, 'rgb(0, 0, 255)'] | |
| ] | |
| } | |
| ]; | |
| Plotly.plot('potato', data, {}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment