-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample3.html
More file actions
85 lines (53 loc) · 10.5 KB
/
example3.html
File metadata and controls
85 lines (53 loc) · 10.5 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bokeh Plot</title>
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css" type="text/css" />
<link rel="stylesheet" href="https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css" type="text/css" />
<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js"></script>
<script type="text/javascript" src="https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
</head>
<body>
<div class="bk-root" id="a04d1cd0-c438-4b37-a1f0-d954e9672648"></div>
<script type="application/json" id="47bc7dd1-6bc0-4cce-808d-f4148b1f2de9">
{"fad0f6c8-f8cc-4284-a89a-091f81b9e19e":{"roots":{"references":[{"attributes":{"palette":["#000000","#252525","#525252","#737373","#969696","#bdbdbd","#d9d9d9","#f0f0f0","#ffffff"]},"id":"bf4f3a27-7bf1-41c8-bd5a-04053f8adbdf","type":"LinearColorMapper"},{"attributes":{"formatter":{"id":"87eb8c44-b6dd-4a9f-8e37-5250534d7d61","type":"BasicTickFormatter"},"plot":{"id":"0f32aca1-64db-4083-83e2-0d89b0f9006c","subtype":"Figure","type":"Plot"},"ticker":{"id":"49138c8a-093b-490d-be97-c9a4294bd9ff","type":"BasicTicker"}},"id":"8666265a-94e5-4398-95fb-bf4123e7c18b","type":"LinearAxis"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"3a7d21e6-9f8a-4e12-842e-2ba4cb89db26","type":"BoxAnnotation"},{"attributes":{},"id":"49138c8a-093b-490d-be97-c9a4294bd9ff","type":"BasicTicker"},{"attributes":{},"id":"9df81a37-b456-4b3d-ba41-87a91d7abac2","type":"SaveTool"},{"attributes":{},"id":"c66bea26-0200-43c1-8dbe-9c6d880b2c3c","type":"Selection"},{"attributes":{},"id":"f1f33922-7062-4e5b-9e50-fc3f7d6c3c30","type":"LinearScale"},{"attributes":{"palette":["#000000","#252525","#525252","#737373","#969696","#bdbdbd","#d9d9d9","#f0f0f0","#ffffff"]},"id":"36db0733-1380-4b19-a684-55965a179605","type":"LinearColorMapper"},{"attributes":{},"id":"55106339-802c-4032-98d5-656cb3dc8ba8","type":"BasicTickFormatter"},{"attributes":{},"id":"307258b4-ee02-48d8-bf64-858ff28b2a93","type":"PanTool"},{"attributes":{"below":[{"id":"8666265a-94e5-4398-95fb-bf4123e7c18b","type":"LinearAxis"}],"left":[{"id":"3b1182f9-bc31-415e-9dbe-64ddf4709f7f","type":"LinearAxis"}],"plot_height":200,"plot_width":200,"renderers":[{"id":"8666265a-94e5-4398-95fb-bf4123e7c18b","type":"LinearAxis"},{"id":"b3b37e67-f31f-4999-8a9a-5022e4a20a93","type":"Grid"},{"id":"3b1182f9-bc31-415e-9dbe-64ddf4709f7f","type":"LinearAxis"},{"id":"2a20b297-573d-466d-967f-9d7593aa39a6","type":"Grid"},{"id":"3a7d21e6-9f8a-4e12-842e-2ba4cb89db26","type":"BoxAnnotation"},{"id":"c9bf87dc-e8d5-40dc-b73a-a000003562c4","type":"GlyphRenderer"}],"title":{"id":"5d49314b-8bd0-407e-bf10-21f746302aba","type":"Title"},"toolbar":{"id":"947924e5-dbf4-410a-b308-540dceffdcb4","type":"Toolbar"},"x_range":{"id":"1aadf5de-30c1-4ebf-a7f3-1cf47430ad35","type":"Range1d"},"x_scale":{"id":"f1f33922-7062-4e5b-9e50-fc3f7d6c3c30","type":"LinearScale"},"y_range":{"id":"c3dd9542-d348-4033-bbfb-34cdbcea8213","type":"Range1d"},"y_scale":{"id":"799b1ee4-b815-4f66-bdfb-4993fbdbc569","type":"LinearScale"}},"id":"0f32aca1-64db-4083-83e2-0d89b0f9006c","subtype":"Figure","type":"Plot"},{"attributes":{"callback":null,"data":{"dh":[2,2],"dw":[2,2],"image":[[[1,3.0],[2,4]],[[1,3.0,2],[1,2,4],[3,3,2]]],"x":[0,2],"y":[0,2]},"selected":{"id":"c66bea26-0200-43c1-8dbe-9c6d880b2c3c","type":"Selection"},"selection_policy":{"id":"d0c3c7e8-82af-4830-8430-58d2248d4dca","type":"UnionRenderers"}},"id":"598e373a-10b5-4437-bc3d-8fa25d9dc0d1","type":"ColumnDataSource"},{"attributes":{},"id":"9049fd6c-f19f-4e78-a821-9d996683b6b5","type":"HelpTool"},{"attributes":{"callback":{"id":"3e1ede33-0570-41bc-af23-502c055b46c2","type":"CustomJS"},"icon":null,"label":"Modify Data"},"id":"71bcc32b-f1dc-452d-823b-7899bc3e564c","type":"Button"},{"attributes":{},"id":"408cf47f-4689-426e-acbc-741fdffbc110","type":"WheelZoomTool"},{"attributes":{},"id":"5f8a55d8-a5dd-427d-8d08-bf327951c843","type":"ResetTool"},{"attributes":{"children":[{"id":"71bcc32b-f1dc-452d-823b-7899bc3e564c","type":"Button"}]},"id":"8f83f6bc-4574-4f6b-ab40-b60b719050b2","type":"WidgetBox"},{"attributes":{"args":{"source":{"id":"598e373a-10b5-4437-bc3d-8fa25d9dc0d1","type":"ColumnDataSource"}},"code":"\n // Java Script code\n console.log(\"Button pressed\");\n \n var image_index=1;\n var d = source.data['image'][image_index];\n console.log(d);\n var rows = d.length;\n for (var row = 0; row < rows; row++){\n var cols = d[row].length;\n for (var col = 0; col < cols; col++) {\n d[row][col] = Math.random();\n }\n }\n source.change.emit();\n"},"id":"3e1ede33-0570-41bc-af23-502c055b46c2","type":"CustomJS"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"307258b4-ee02-48d8-bf64-858ff28b2a93","type":"PanTool"},{"id":"408cf47f-4689-426e-acbc-741fdffbc110","type":"WheelZoomTool"},{"id":"5030a989-237a-441d-811d-9b3c220b2059","type":"BoxZoomTool"},{"id":"9df81a37-b456-4b3d-ba41-87a91d7abac2","type":"SaveTool"},{"id":"5f8a55d8-a5dd-427d-8d08-bf327951c843","type":"ResetTool"},{"id":"9049fd6c-f19f-4e78-a821-9d996683b6b5","type":"HelpTool"}]},"id":"947924e5-dbf4-410a-b308-540dceffdcb4","type":"Toolbar"},{"attributes":{},"id":"799b1ee4-b815-4f66-bdfb-4993fbdbc569","type":"LinearScale"},{"attributes":{"callback":null,"end":4},"id":"c3dd9542-d348-4033-bbfb-34cdbcea8213","type":"Range1d"},{"attributes":{},"id":"d0c3c7e8-82af-4830-8430-58d2248d4dca","type":"UnionRenderers"},{"attributes":{"plot":null,"text":""},"id":"5d49314b-8bd0-407e-bf10-21f746302aba","type":"Title"},{"attributes":{"overlay":{"id":"3a7d21e6-9f8a-4e12-842e-2ba4cb89db26","type":"BoxAnnotation"}},"id":"5030a989-237a-441d-811d-9b3c220b2059","type":"BoxZoomTool"},{"attributes":{},"id":"0e1c6c02-53d8-4310-bb4f-6aee646bf71a","type":"BasicTicker"},{"attributes":{"plot":{"id":"0f32aca1-64db-4083-83e2-0d89b0f9006c","subtype":"Figure","type":"Plot"},"ticker":{"id":"49138c8a-093b-490d-be97-c9a4294bd9ff","type":"BasicTicker"}},"id":"b3b37e67-f31f-4999-8a9a-5022e4a20a93","type":"Grid"},{"attributes":{"color_mapper":{"id":"bf4f3a27-7bf1-41c8-bd5a-04053f8adbdf","type":"LinearColorMapper"},"dh":{"field":"dh","units":"data"},"dw":{"field":"dw","units":"data"},"image":{"field":"image"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1ba44e89-3ac9-45d6-acce-ace4036874e7","type":"Image"},{"attributes":{"color_mapper":{"id":"36db0733-1380-4b19-a684-55965a179605","type":"LinearColorMapper"},"dh":{"field":"dh","units":"data"},"dw":{"field":"dw","units":"data"},"image":{"field":"image"},"x":{"field":"x"},"y":{"field":"y"}},"id":"01c5a748-34fd-4fdb-bf42-5432e25ee989","type":"Image"},{"attributes":{"source":{"id":"598e373a-10b5-4437-bc3d-8fa25d9dc0d1","type":"ColumnDataSource"}},"id":"c474a3fc-1cb9-454a-99bd-3999a20c05b9","type":"CDSView"},{"attributes":{"callback":null,"end":4},"id":"1aadf5de-30c1-4ebf-a7f3-1cf47430ad35","type":"Range1d"},{"attributes":{"formatter":{"id":"55106339-802c-4032-98d5-656cb3dc8ba8","type":"BasicTickFormatter"},"plot":{"id":"0f32aca1-64db-4083-83e2-0d89b0f9006c","subtype":"Figure","type":"Plot"},"ticker":{"id":"0e1c6c02-53d8-4310-bb4f-6aee646bf71a","type":"BasicTicker"}},"id":"3b1182f9-bc31-415e-9dbe-64ddf4709f7f","type":"LinearAxis"},{"attributes":{"dimension":1,"plot":{"id":"0f32aca1-64db-4083-83e2-0d89b0f9006c","subtype":"Figure","type":"Plot"},"ticker":{"id":"0e1c6c02-53d8-4310-bb4f-6aee646bf71a","type":"BasicTicker"}},"id":"2a20b297-573d-466d-967f-9d7593aa39a6","type":"Grid"},{"attributes":{},"id":"87eb8c44-b6dd-4a9f-8e37-5250534d7d61","type":"BasicTickFormatter"},{"attributes":{"children":[{"id":"0f32aca1-64db-4083-83e2-0d89b0f9006c","subtype":"Figure","type":"Plot"},{"id":"8f83f6bc-4574-4f6b-ab40-b60b719050b2","type":"WidgetBox"}]},"id":"c54bf641-325b-44f7-9e48-e1a7a3da887e","type":"Row"},{"attributes":{"data_source":{"id":"598e373a-10b5-4437-bc3d-8fa25d9dc0d1","type":"ColumnDataSource"},"glyph":{"id":"1ba44e89-3ac9-45d6-acce-ace4036874e7","type":"Image"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"01c5a748-34fd-4fdb-bf42-5432e25ee989","type":"Image"},"selection_glyph":null,"view":{"id":"c474a3fc-1cb9-454a-99bd-3999a20c05b9","type":"CDSView"}},"id":"c9bf87dc-e8d5-40dc-b73a-a000003562c4","type":"GlyphRenderer"}],"root_ids":["c54bf641-325b-44f7-9e48-e1a7a3da887e"]},"title":"Bokeh Application","version":"0.13.0"}}
</script>
<script type="text/javascript">
(function() {
var fn = function() {
Bokeh.safely(function() {
(function(root) {
function embed_document(root) {
var docs_json = document.getElementById('47bc7dd1-6bc0-4cce-808d-f4148b1f2de9').textContent;
var render_items = [{"docid":"fad0f6c8-f8cc-4284-a89a-091f81b9e19e","roots":{"c54bf641-325b-44f7-9e48-e1a7a3da887e":"a04d1cd0-c438-4b37-a1f0-d954e9672648"}}];
root.Bokeh.embed.embed_items(docs_json, render_items);
}
if (root.Bokeh !== undefined) {
embed_document(root);
} else {
var attempts = 0;
var timer = setInterval(function(root) {
if (root.Bokeh !== undefined) {
embed_document(root);
clearInterval(timer);
}
attempts++;
if (attempts > 100) {
console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing")
clearInterval(timer);
}
}, 10, root)
}
})(window);
});
};
if (document.readyState != "loading") fn();
else document.addEventListener("DOMContentLoaded", fn);
})();
</script>
</body>
</html>