-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrorbars.html
More file actions
39 lines (36 loc) · 1020 Bytes
/
errorbars.html
File metadata and controls
39 lines (36 loc) · 1020 Bytes
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
<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': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
'y': [0, 2, 5, 8, 13, 25, 40, 60, 80, 85, 87],
'error_y': {
'type': 'data',
'array': [0, 0.8, 2, 4, 4, 6, 8, 6, 4, 2, 1],
'visible': true
},
'type': 'scatter'
}];
let layout = {
'yaxis': {'title': 'Percent recovered'},
'xaxis': {'title': 'Days after infection'}
};
$(() => {
// everything here happens only after the page is loaded
Plotly.newPlot("myGraph", data, layout);
});
</script>
<style>
#myGraph {
width: 600px;
height: 400px
}
</style>
</head>
<body>
<div>Here is our graph:</div>
<div id="myGraph"></div>
</body>
</html>