Created
August 27, 2017 16:24
-
-
Save canavandl/84f913419f41685dd3ded34ec33d1fba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"\n", | |
" <div class=\"bk-root\">\n", | |
" <a href=\"http://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n", | |
" <span id=\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\">Loading BokehJS ...</span>\n", | |
" </div>\n", | |
" <p style=\"background-color: #f2d7dc;\">Warning: Requesting CDN BokehJS version '0.12.7rc3' from Bokeh development version '0.12.7rc3-4-g7aa434b4c'. This configuration is unsupported and may not work!</p>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/javascript": [ | |
"\n", | |
"(function(root) {\n", | |
" function now() {\n", | |
" return new Date();\n", | |
" }\n", | |
"\n", | |
" var force = true;\n", | |
"\n", | |
" if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", | |
" root._bokeh_onload_callbacks = [];\n", | |
" root._bokeh_is_loading = undefined;\n", | |
" }\n", | |
"\n", | |
" var JS_MIME = 'application/javascript';\n", | |
" var HTML_MIME = 'text/html';\n", | |
" var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", | |
" var CLASS_NAME = 'output_bokeh rendered_html';\n", | |
"\n", | |
" /**\n", | |
" * Render data to the DOM node\n", | |
" */\n", | |
" function render(props, node) {\n", | |
" var script = document.createElement(\"script\");\n", | |
" node.appendChild(script);\n", | |
" }\n", | |
"\n", | |
" /**\n", | |
" * Handle when an output is cleared or removed\n", | |
" */\n", | |
" function handleClearOutput(event, handle) {\n", | |
" var cell = handle.cell;\n", | |
"\n", | |
" var id = cell.output_area._bokeh_element_id;\n", | |
" var server_id = cell.output_area._bokeh_server_id;\n", | |
" // Clean up Bokeh references\n", | |
" if (id !== undefined) {\n", | |
" Bokeh.index[id].model.document.clear();\n", | |
" delete Bokeh.index[id];\n", | |
" }\n", | |
"\n", | |
" if (server_id !== undefined) {\n", | |
" // Clean up Bokeh references\n", | |
" var cmd = \"from bokeh.io import _state; print(_state.uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", | |
" cell.notebook.kernel.execute(cmd, {\n", | |
" iopub: {\n", | |
" output: function(msg) {\n", | |
" var element_id = msg.content.text.trim();\n", | |
" Bokeh.index[element_id].model.document.clear();\n", | |
" delete Bokeh.index[element_id];\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" // Destroy server and session\n", | |
" var cmd = \"from bokeh import io; io._destroy_server('\" + server_id + \"')\";\n", | |
" cell.notebook.kernel.execute(cmd);\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" /**\n", | |
" * Handle when a new output is added\n", | |
" */\n", | |
" function handleAddOutput(event, handle) {\n", | |
" var output_area = handle.output_area;\n", | |
" var output = handle.output;\n", | |
"\n", | |
" var toinsert = output_area.element.find(`.${\"output_bokeh\"}`)\n", | |
"\n", | |
" if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", | |
" toinsert[0].firstChild.textContent = output.data[JS_MIME]\n", | |
" // store reference to embed id on output_area\n", | |
" output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
" }\n", | |
" if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
" var bk_div = document.createElement(\"div\")\n", | |
" bk_div.innerHTML = output.data[HTML_MIME];\n", | |
" var script_attrs = bk_div.children[0].attributes;\n", | |
" for (var i = 0; i < script_attrs.length; i++) {\n", | |
" toinsert[0].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value)\n", | |
" }\n", | |
" // store reference to server id on output_area\n", | |
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" function register_renderer(notebook, OutputArea) {\n", | |
" // get OutputArea instance\n", | |
" var code_cell = notebook.get_cells().reduce(function(result, cell) { return cell.output_area ? cell : result });\n", | |
" var output_area = code_cell.output_area;\n", | |
"\n", | |
" function append_mime(data, metadata, element) {\n", | |
" // create a DOM node to render to\n", | |
" var toinsert = this.create_output_subarea(\n", | |
" metadata,\n", | |
" CLASS_NAME,\n", | |
" EXEC_MIME_TYPE\n", | |
" );\n", | |
" this.keyboard_manager.register_events(toinsert);\n", | |
" // Render to node\n", | |
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
" render(props, toinsert[0]);\n", | |
" element.append(toinsert);\n", | |
" return toinsert\n", | |
" }\n", | |
"\n", | |
" /* Handle when an output is cleared or removed */\n", | |
" output_area.events.on('clear_output.CodeCell', handleClearOutput);\n", | |
" output_area.events.on('delete.Cell', handleClearOutput);\n", | |
"\n", | |
" /* Handle when a new output is added */\n", | |
" output_area.events.on('output_added.OutputArea', handleAddOutput);\n", | |
"\n", | |
" /**\n", | |
" * Register the mime type and append_mime function with output_area\n", | |
" */\n", | |
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
" /* Is output safe? */\n", | |
" safe: true,\n", | |
" /* Index of renderer in `output_area.display_order` */\n", | |
" index: 0\n", | |
" });\n", | |
" }\n", | |
"\n", | |
" // register the mime type if in Jupyter Notebook environment and previously unregistered\n", | |
" var OutputArea = root.Jupyter.OutputArea;\n", | |
" if ((root.Jupyter !== undefined) && (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1)) {\n", | |
" register_renderer(root.Jupyter.notebook, OutputArea);\n", | |
" }\n", | |
"\n", | |
" \n", | |
" if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", | |
" root._bokeh_timeout = Date.now() + 5000;\n", | |
" root._bokeh_failed_load = false;\n", | |
" }\n", | |
"\n", | |
" var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
" \"<div style='background-color: #fdd'>\\n\"+\n", | |
" \"<p>\\n\"+\n", | |
" \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
" \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
" \"</p>\\n\"+\n", | |
" \"<ul>\\n\"+\n", | |
" \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
" \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
" \"</ul>\\n\"+\n", | |
" \"<code>\\n\"+\n", | |
" \"from bokeh.resources import INLINE\\n\"+\n", | |
" \"output_notebook(resources=INLINE)\\n\"+\n", | |
" \"</code>\\n\"+\n", | |
" \"</div>\"}};\n", | |
"\n", | |
" function display_loaded() {\n", | |
" if (root.Bokeh !== undefined) {\n", | |
" var el = document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\");\n", | |
" if (el != null) {\n", | |
" el.textContent = \"BokehJS \" + Bokeh.version + \" successfully loaded.\";\n", | |
" }\n", | |
" } else if (Date.now() < root._bokeh_timeout) {\n", | |
" setTimeout(display_loaded, 100)\n", | |
" }\n", | |
" }\n", | |
"\n", | |
"\n", | |
" function run_callbacks() {\n", | |
" try {\n", | |
" root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
" }\n", | |
" finally {\n", | |
" delete root._bokeh_onload_callbacks\n", | |
" }\n", | |
" console.info(\"Bokeh: all callbacks have finished\");\n", | |
" }\n", | |
"\n", | |
" function load_libs(js_urls, callback) {\n", | |
" root._bokeh_onload_callbacks.push(callback);\n", | |
" if (root._bokeh_is_loading > 0) {\n", | |
" console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
" return null;\n", | |
" }\n", | |
" if (js_urls == null || js_urls.length === 0) {\n", | |
" run_callbacks();\n", | |
" return null;\n", | |
" }\n", | |
" console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
" root._bokeh_is_loading = js_urls.length;\n", | |
" for (var i = 0; i < js_urls.length; i++) {\n", | |
" var url = js_urls[i];\n", | |
" var s = document.createElement('script');\n", | |
" s.src = url;\n", | |
" s.async = false;\n", | |
" s.onreadystatechange = s.onload = function() {\n", | |
" root._bokeh_is_loading--;\n", | |
" if (root._bokeh_is_loading === 0) {\n", | |
" console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
" run_callbacks()\n", | |
" }\n", | |
" };\n", | |
" s.onerror = function() {\n", | |
" console.warn(\"failed to load library \" + url);\n", | |
" };\n", | |
" console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
" }\n", | |
" };var element = document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\");\n", | |
" if (element == null) {\n", | |
" console.log(\"Bokeh: ERROR: autoload.js configured with elementid '0f8f91d0-1a33-444e-920c-8d9b2eeca173' but no matching script tag was found. \")\n", | |
" return false;\n", | |
" }\n", | |
"\n", | |
" var js_urls = [\"https://cdn.pydata.org/bokeh/dev/bokeh-0.12.7rc3.min.js\", \"https://cdn.pydata.org/bokeh/dev/bokeh-widgets-0.12.7rc3.min.js\", \"https://cdn.pydata.org/bokeh/dev/bokeh-tables-0.12.7rc3.min.js\", \"https://cdn.pydata.org/bokeh/dev/bokeh-gl-0.12.7rc3.min.js\"];\n", | |
"\n", | |
" var inline_js = [\n", | |
" function(Bokeh) {\n", | |
" Bokeh.set_log_level(\"info\");\n", | |
" },\n", | |
" \n", | |
" function(Bokeh) {\n", | |
" \n", | |
" },\n", | |
" \n", | |
" function(Bokeh) {\n", | |
" \n", | |
" document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\").textContent = \"BokehJS is loading...\";\n", | |
" },\n", | |
" function(Bokeh) {\n", | |
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/dev/bokeh-0.12.7rc3.min.css\");\n", | |
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/dev/bokeh-0.12.7rc3.min.css\");\n", | |
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/dev/bokeh-widgets-0.12.7rc3.min.css\");\n", | |
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/dev/bokeh-widgets-0.12.7rc3.min.css\");\n", | |
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/dev/bokeh-tables-0.12.7rc3.min.css\");\n", | |
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/dev/bokeh-tables-0.12.7rc3.min.css\");\n", | |
" }\n", | |
" ];\n", | |
"\n", | |
" function run_inline_js() {\n", | |
" \n", | |
" if ((root.Bokeh !== undefined) || (force === true)) {\n", | |
" for (var i = 0; i < inline_js.length; i++) {\n", | |
" inline_js[i].call(root, root.Bokeh);\n", | |
" }if (force === true) {\n", | |
" display_loaded();\n", | |
" }} else if (Date.now() < root._bokeh_timeout) {\n", | |
" setTimeout(run_inline_js, 100);\n", | |
" } else if (!root._bokeh_failed_load) {\n", | |
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
" root._bokeh_failed_load = true;\n", | |
" } else if (force !== true) {\n", | |
" var cell = $(document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\")).parents('.cell').data().cell;\n", | |
" cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
" }\n", | |
"\n", | |
" }\n", | |
"\n", | |
" if (root._bokeh_is_loading === 0) {\n", | |
" console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
" run_inline_js();\n", | |
" } else {\n", | |
" load_libs(js_urls, function() {\n", | |
" console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
" run_inline_js();\n", | |
" });\n", | |
" }\n", | |
"}(window));" | |
], | |
"application/vnd.bokehjs_load.v0+json": { | |
"script": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n if (root.Bokeh !== undefined) {\n var el = document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\");\n if (el != null) {\n el.textContent = \"BokehJS \" + Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n }\n finally {\n delete root._bokeh_onload_callbacks\n }\n console.info(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(js_urls, callback) {\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = js_urls.length;\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var s = document.createElement('script');\n s.src = url;\n s.async = false;\n s.onreadystatechange = s.onload = function() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: all BokehJS libraries loaded\");\n run_callbacks()\n }\n };\n s.onerror = function() {\n console.warn(\"failed to load library \" + url);\n };\n console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.getElementsByTagName(\"head\")[0].appendChild(s);\n }\n };var element = document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid '0f8f91d0-1a33-444e-920c-8d9b2eeca173' but no matching script tag was found. \")\n return false;\n }\n\n var js_urls = [\"https://cdn.pydata.org/bokeh/dev/bokeh-0.12.7rc3.min.js\", \"https://cdn.pydata.org/bokeh/dev/bokeh-widgets-0.12.7rc3.min.js\", \"https://cdn.pydata.org/bokeh/dev/bokeh-tables-0.12.7rc3.min.js\", \"https://cdn.pydata.org/bokeh/dev/bokeh-gl-0.12.7rc3.min.js\"];\n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n \n },\n \n function(Bokeh) {\n \n document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\").textContent = \"BokehJS is loading...\";\n },\n function(Bokeh) {\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/dev/bokeh-0.12.7rc3.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/dev/bokeh-0.12.7rc3.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/dev/bokeh-widgets-0.12.7rc3.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/dev/bokeh-widgets-0.12.7rc3.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/dev/bokeh-tables-0.12.7rc3.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/dev/bokeh-tables-0.12.7rc3.min.css\");\n }\n ];\n\n function run_inline_js() {\n \n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"0f8f91d0-1a33-444e-920c-8d9b2eeca173\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(js_urls, function() {\n console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" | |
} | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"from bokeh.plotting import output_notebook, figure, show\n", | |
"\n", | |
"output_notebook()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"\n", | |
"<div class=\"bk-root\">\n", | |
" <div class=\"bk-plotdiv\" id=\"cbcf544b-75c7-41e4-884d-82318946e62d\"></div>\n", | |
"</div>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/javascript": [ | |
"(function() {\n", | |
" var fn = function() {\n", | |
" Bokeh.safely(function() {\n", | |
" var docs_json = {\"fed48688-0021-4461-afbb-ab2f1d810d35\":{\"roots\":{\"references\":[{\"attributes\":{},\"id\":\"0c9845bd-8fbd-4e47-843e-b489e34d0e4b\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"5cecc154-7130-475c-a9f0-4cc5bab4f75c\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"3e6aafe6-9ffc-4a16-87e6-6323e0fae021\",\"type\":\"LinearScale\"},{\"attributes\":{\"data_source\":{\"id\":\"fec8c1c6-585d-4d0f-a3f7-52575365e4b7\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"db27e7aa-43c7-46e1-b252-483ca16f7412\",\"type\":\"Circle\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"d6ac2208-8bb9-4d5b-97d2-08419d5ef148\",\"type\":\"Circle\"},\"selection_glyph\":null,\"view\":{\"id\":\"6f72e2c6-7b66-4d2d-980d-e18edc49f020\",\"type\":\"CDSView\"}},\"id\":\"5daee9ab-1dd5-47c1-850d-46b27da0e661\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"d6ac2208-8bb9-4d5b-97d2-08419d5ef148\",\"type\":\"Circle\"},{\"attributes\":{},\"id\":\"1a774b95-0fb2-420d-97a9-e0f9b61333dc\",\"type\":\"BasicTicker\"},{\"attributes\":{},\"id\":\"7bf0acff-10b2-4b8b-878d-16164278f4c7\",\"type\":\"ResetTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"b364e240-528a-4254-9fc3-6bb20662b5b7\",\"type\":\"PanTool\"},{\"id\":\"0e563f6c-eec8-4a64-9161-b78a4d53d936\",\"type\":\"WheelZoomTool\"},{\"id\":\"edc2584c-2d27-4b7b-823b-4002b9ac5e5f\",\"type\":\"BoxZoomTool\"},{\"id\":\"0c9845bd-8fbd-4e47-843e-b489e34d0e4b\",\"type\":\"SaveTool\"},{\"id\":\"7bf0acff-10b2-4b8b-878d-16164278f4c7\",\"type\":\"ResetTool\"},{\"id\":\"3ec87e3e-9dac-4ed8-ad57-30707ac7b481\",\"type\":\"HelpTool\"}]},\"id\":\"affbd39b-47b6-41fe-9db6-8bead43a6a73\",\"type\":\"Toolbar\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"x\",\"y\"],\"data\":{\"x\":[1,2,3],\"y\":[1,2,3]}},\"id\":\"fec8c1c6-585d-4d0f-a3f7-52575365e4b7\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"formatter\":{\"id\":\"7fd4706f-b5ea-44ba-a3ac-c82b3f587b9c\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"18836314-3ed4-4e37-85c2-165deeb8ddc8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"5cecc154-7130-475c-a9f0-4cc5bab4f75c\",\"type\":\"BasicTicker\"}},\"id\":\"67485f0a-4c85-497a-8894-b8d16c4c2718\",\"type\":\"LinearAxis\"},{\"attributes\":{\"plot\":null,\"text\":\"\"},\"id\":\"392c14c2-6189-4bd7-a435-85bde5ceda79\",\"type\":\"Title\"},{\"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\":\"6a06f4e7-3820-4270-876f-dd4bc24e355d\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"7fd4706f-b5ea-44ba-a3ac-c82b3f587b9c\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"dd9d50df-19eb-4d55-bbb0-ae5679bab75e\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"b364e240-528a-4254-9fc3-6bb20662b5b7\",\"type\":\"PanTool\"},{\"attributes\":{\"below\":[{\"id\":\"5c3e7983-f9b0-4fdd-8d71-2a5d0a1ab5c8\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"67485f0a-4c85-497a-8894-b8d16c4c2718\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"5c3e7983-f9b0-4fdd-8d71-2a5d0a1ab5c8\",\"type\":\"LinearAxis\"},{\"id\":\"7f3a38f5-3c7a-46f8-a304-61f96d0ceb28\",\"type\":\"Grid\"},{\"id\":\"67485f0a-4c85-497a-8894-b8d16c4c2718\",\"type\":\"LinearAxis\"},{\"id\":\"5dbb71ae-0e1e-49bb-b3d8-2edd1c3b3798\",\"type\":\"Grid\"},{\"id\":\"6a06f4e7-3820-4270-876f-dd4bc24e355d\",\"type\":\"BoxAnnotation\"},{\"id\":\"5daee9ab-1dd5-47c1-850d-46b27da0e661\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"392c14c2-6189-4bd7-a435-85bde5ceda79\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"affbd39b-47b6-41fe-9db6-8bead43a6a73\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"e79c3d5f-c7cf-4aee-b57a-f779e19e3b5a\",\"type\":\"DataRange1d\"},\"x_scale\":{\"id\":\"dd9d50df-19eb-4d55-bbb0-ae5679bab75e\",\"type\":\"LinearScale\"},\"y_range\":{\"id\":\"8b1cf844-5531-45b5-abf6-74700e39d58e\",\"type\":\"DataRange1d\"},\"y_scale\":{\"id\":\"3e6aafe6-9ffc-4a16-87e6-6323e0fae021\",\"type\":\"LinearScale\"}},\"id\":\"18836314-3ed4-4e37-85c2-165deeb8ddc8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"formatter\":{\"id\":\"7218b27a-31f4-4350-a2fb-2fa34fb99cb0\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"18836314-3ed4-4e37-85c2-165deeb8ddc8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1a774b95-0fb2-420d-97a9-e0f9b61333dc\",\"type\":\"BasicTicker\"}},\"id\":\"5c3e7983-f9b0-4fdd-8d71-2a5d0a1ab5c8\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"7218b27a-31f4-4350-a2fb-2fa34fb99cb0\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"3ec87e3e-9dac-4ed8-ad57-30707ac7b481\",\"type\":\"HelpTool\"},{\"attributes\":{\"callback\":null},\"id\":\"8b1cf844-5531-45b5-abf6-74700e39d58e\",\"type\":\"DataRange1d\"},{\"attributes\":{\"plot\":{\"id\":\"18836314-3ed4-4e37-85c2-165deeb8ddc8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"1a774b95-0fb2-420d-97a9-e0f9b61333dc\",\"type\":\"BasicTicker\"}},\"id\":\"7f3a38f5-3c7a-46f8-a304-61f96d0ceb28\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null},\"id\":\"e79c3d5f-c7cf-4aee-b57a-f779e19e3b5a\",\"type\":\"DataRange1d\"},{\"attributes\":{\"overlay\":{\"id\":\"6a06f4e7-3820-4270-876f-dd4bc24e355d\",\"type\":\"BoxAnnotation\"}},\"id\":\"edc2584c-2d27-4b7b-823b-4002b9ac5e5f\",\"type\":\"BoxZoomTool\"},{\"attributes\":{},\"id\":\"0e563f6c-eec8-4a64-9161-b78a4d53d936\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"source\":{\"id\":\"fec8c1c6-585d-4d0f-a3f7-52575365e4b7\",\"type\":\"ColumnDataSource\"}},\"id\":\"6f72e2c6-7b66-4d2d-980d-e18edc49f020\",\"type\":\"CDSView\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"18836314-3ed4-4e37-85c2-165deeb8ddc8\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"5cecc154-7130-475c-a9f0-4cc5bab4f75c\",\"type\":\"BasicTicker\"}},\"id\":\"5dbb71ae-0e1e-49bb-b3d8-2edd1c3b3798\",\"type\":\"Grid\"},{\"attributes\":{\"fill_color\":{\"value\":\"#1f77b4\"},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"db27e7aa-43c7-46e1-b252-483ca16f7412\",\"type\":\"Circle\"}],\"root_ids\":[\"18836314-3ed4-4e37-85c2-165deeb8ddc8\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.7rc3-4-g7aa434b4c\"}};\n", | |
" var render_items = [{\"docid\":\"fed48688-0021-4461-afbb-ab2f1d810d35\",\"elementid\":\"cbcf544b-75c7-41e4-884d-82318946e62d\",\"modelid\":\"18836314-3ed4-4e37-85c2-165deeb8ddc8\"}];\n", | |
" \n", | |
" Bokeh.embed.embed_items(docs_json, render_items);\n", | |
" });\n", | |
" };\n", | |
" if (document.readyState != \"loading\") fn();\n", | |
" else document.addEventListener(\"DOMContentLoaded\", fn);\n", | |
"})();\n" | |
], | |
"application/vnd.bokehjs_exec.v0+json": "" | |
}, | |
"metadata": { | |
"application/vnd.bokehjs_exec.v0+json": { | |
"id": "18836314-3ed4-4e37-85c2-165deeb8ddc8" | |
} | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"p = figure()\n", | |
"p.scatter(x=[1,2,3], y=[1,2,3])\n", | |
"\n", | |
"show(p)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.5.2" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment