-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
59 lines (55 loc) · 1.19 KB
/
index.js
File metadata and controls
59 lines (55 loc) · 1.19 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
let plot = document.getElementById('plot')
let x, y, z
chrome.storage.local.get('x', function (result) {
x = result.x
chrome.storage.local.get('y', function (result) {
y = result.y
chrome.storage.local.get('z', function (result) {
z = result.z
draw_plot(x, y, z)
})
})
})
function draw_plot(x, y, z) {
console.log(x)
console.log(y)
console.log(z)
let data = [{
x: x,
y: y,
z: z,
type: 'contour',
contours: {
coloring: 'lines'
},
colorscale: [
['0', '#ffffff'],
['1', '#ffffff']
],
colorbar: {
thickness: 0
}
}]
let layout = {
width: window.innerWidth + 70,
height: window.innerHeight,
xaxis: {
visible: false
},
yaxis: {
visible: false
},
coloraxis_showScale: false,
margin: {
t: 0,
r: 0,
b: 0,
l: 0
},
paper_bgcolor: '#000000',
plot_bgcolor: '#000000'
}
Plotly.newPlot('plot', data, layout, {
displayModeBar: false
})
}