Skip to content

Instantly share code, notes, and snippets.

@joecastelo
Created May 27, 2020 21:01
Show Gist options
  • Save joecastelo/aafff68089badc5febc81bb043e783b7 to your computer and use it in GitHub Desktop.
Save joecastelo/aafff68089badc5febc81bb043e783b7 to your computer and use it in GitHub Desktop.
Simple Plot.ly JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>Plot.ly 3D</title>
<script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script>
</head>
<body>
<h1>3D Plot</h1>
<div id="chart"> </div>
</body>
<script>
var chart = document.getElementById('chart');
var data = {
x: [1, 2, 3, 4, 5],
y: [1, 2, 4, 8, 16],
z: [1, 2, 3, 4, 10],
type: 'scatter3d'
};
Plotly.newPlot(chart, [data], {
margin: {
t: 0
}
});
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment