-
Notifications
You must be signed in to change notification settings - Fork 0
/
scatter3d-and-bar.html
40 lines (37 loc) · 1.21 KB
/
scatter3d-and-bar.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<html>
<head>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script>
let data = [{
"x": [1, 0.81, 0.32, -0.28, -0.79, -1.00, -0.84, -0.36, 0.25, 0.76],
"y": [0, 0.58, 0.94, 0.96, 0.61, 0.04, -0.55, -0.93, -0.97, -0.65],
"z": [0, 0.62, 1.24, 1.86, 2.48, 3.1, 3.72, 4.34, 4.96, 5.58],
"mode": "markers",
"type": "scatter3d"
}];
let test_data = [{
"x": ["November 11", "November 12", "November 13", "November 14", "November 15", "November 16", "November 17"],
"y": [5, 6, 6, 8, 0, 13, 12],
"type": "bar"
}];
$(() => {
// everything here happens only after the page is loaded
Plotly.newPlot("myGraph", data);
Plotly.newPlot("positiveTests", test_data);
});
</script>
<style>
#myGraph, #positiveTests {
width: 600px;
height: 400px
}
</style>
</head>
<body>
<div>Here is our graph:</div>
<div id="myGraph"></div>
<div>Positive tests by day:</div>
<div id="positiveTests"></div>
</body>
</html>