Skip to content

Instantly share code, notes, and snippets.

@philippjfr
Created February 24, 2017 00:07
Show Gist options
  • Save philippjfr/14bdf382f39ad8fd9ca5515fcf85f9fa to your computer and use it in GitHub Desktop.
Save philippjfr/14bdf382f39ad8fd9ca5515fcf85f9fa to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"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=\"603da7cf-d00b-411f-a4c3-664f38f0cc22\">Loading BokehJS ...</span>\n",
" </div>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
"(function(global) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" var force = true;\n",
"\n",
" if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
" window._bokeh_onload_callbacks = [];\n",
" window._bokeh_is_loading = undefined;\n",
" }\n",
"\n",
"\n",
" \n",
" if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n",
" window._bokeh_timeout = Date.now() + 5000;\n",
" window._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 (window.Bokeh !== undefined) {\n",
" document.getElementById(\"603da7cf-d00b-411f-a4c3-664f38f0cc22\").textContent = \"BokehJS successfully loaded.\";\n",
" } else if (Date.now() < window._bokeh_timeout) {\n",
" setTimeout(display_loaded, 100)\n",
" }\n",
" }\n",
"\n",
" function run_callbacks() {\n",
" window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
" delete window._bokeh_onload_callbacks\n",
" console.info(\"Bokeh: all callbacks have finished\");\n",
" }\n",
"\n",
" function load_libs(js_urls, callback) {\n",
" window._bokeh_onload_callbacks.push(callback);\n",
" if (window._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",
" window._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",
" window._bokeh_is_loading--;\n",
" if (window._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(\"603da7cf-d00b-411f-a4c3-664f38f0cc22\");\n",
" if (element == null) {\n",
" console.log(\"Bokeh: ERROR: autoload.js configured with elementid '603da7cf-d00b-411f-a4c3-664f38f0cc22' but no matching script tag was found. \")\n",
" return false;\n",
" }\n",
"\n",
" var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.4.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.4.min.js\"];\n",
"\n",
" var inline_js = [\n",
" function(Bokeh) {\n",
" Bokeh.set_log_level(\"info\");\n",
" },\n",
" \n",
" function(Bokeh) {\n",
" \n",
" document.getElementById(\"603da7cf-d00b-411f-a4c3-664f38f0cc22\").textContent = \"BokehJS is loading...\";\n",
" },\n",
" function(Bokeh) {\n",
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.4.min.css\");\n",
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.4.min.css\");\n",
" console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.4.min.css\");\n",
" Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.4.min.css\");\n",
" }\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" \n",
" if ((window.Bokeh !== undefined) || (force === true)) {\n",
" for (var i = 0; i < inline_js.length; i++) {\n",
" inline_js[i](window.Bokeh);\n",
" }if (force === true) {\n",
" display_loaded();\n",
" }} else if (Date.now() < window._bokeh_timeout) {\n",
" setTimeout(run_inline_js, 100);\n",
" } else if (!window._bokeh_failed_load) {\n",
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
" window._bokeh_failed_load = true;\n",
" } else if (force !== true) {\n",
" var cell = $(document.getElementById(\"603da7cf-d00b-411f-a4c3-664f38f0cc22\")).parents('.cell').data().cell;\n",
" cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
" }\n",
"\n",
" }\n",
"\n",
" if (window._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",
"}(this));"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"\n",
"import numpy as np\n",
"import param\n",
"import paramnb\n",
"import holoviews as hv\n",
"import holoviews.plotting.mpl\n",
"import holoviews.plotting.bokeh\n",
"\n",
"import bokeh.io\n",
"\n",
"bokeh.io.output_notebook()\n",
"\n",
"renderer = hv.Store.renderers['bokeh']"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false,
"deletable": true,
"editable": true
},
"outputs": [
{
"data": {
"application/javascript": [
"\n",
"define('activehtml', [\"jupyter-js-widgets\"], function(widgets) {\n",
" var ActiveHTMLView = widgets.HTMLView.extend({\n",
" update: function() {\n",
" $(this.el).html(this.model.get('value'));\n",
" }\n",
" });\n",
" return {\n",
" ActiveHTMLView: ActiveHTMLView\n",
" };\n",
"});\n"
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Widget Javascript not detected. It may not be installed or enabled properly.\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "084c97dca04f4160ac80a5003e06bbe7"
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"def dims_to_params(obj):\n",
" class WrapperMeta(param.parameterized.ParameterizedMetaclass):\n",
" def __new__(cls, name, bases, dct):\n",
" for kd in obj.kdims:\n",
" dct[kd.name] = param.Number(bounds=kd.range)\n",
" return super(WrapperMeta, cls).__new__(cls, name, bases, dct)\n",
"\n",
" class DynamicWrapper(param.Parameterized):\n",
" __metaclass__ = WrapperMeta\n",
" \n",
" plot = renderer.get_plot(obj)\n",
" view = paramnb.view.HTML(default=plot, renderer=renderer.figure_data)\n",
" \n",
" def update(self, **kwargs):\n",
" key = tuple(getattr(self, kd.name) for kd in obj.kdims)\n",
" self.plot.update(key)\n",
" self.plot.push()\n",
" #self.view = self.plot\n",
" return DynamicWrapper()\n",
"\n",
"dyn = dims_to_params(hv.DynamicMap(lambda i: hv.Curve(np.random.rand(10)),\n",
" kdims=[hv.Dimension('Magnitude', range=(0,10))]))\n",
"\n",
"paramnb.Widgets(dyn, callback=dyn.update)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [conda env:science]",
"language": "python",
"name": "conda-env-science-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"084c97dca04f4160ac80a5003e06bbe7": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "VBoxModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"children": [
"IPY_MODEL_eb8e49023dcf4c729be989e004cfd752",
"IPY_MODEL_47f6d7d3726c46c283a8d9a1ff124153"
],
"layout": "IPY_MODEL_21ba815be4cf455da54102e69981dbc7"
}
},
"21ba815be4cf455da54102e69981dbc7": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "LayoutModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0"
}
},
"41e0f89e13d44231a2bcefd3e615023d": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "LayoutModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"display": "flex",
"flex_flow": "column"
}
},
"43e5fa101d46482fa8b3d422f6ff083b": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "HTMLModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"layout": "IPY_MODEL_56424e1e9f4c42078cd03f0e375e7c87",
"placeholder": "\\u200b",
"value": "<div class=\"ttip\" style=\"padding: 5px; width: 67px;\n text-align: right;\">Magnitude</div>"
}
},
"464f0939d730429ebb192f06cf019323": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "HBoxModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"children": [
"IPY_MODEL_43e5fa101d46482fa8b3d422f6ff083b",
"IPY_MODEL_d887372be1d24b03bae106f7e01e9647"
],
"layout": "IPY_MODEL_c85ae757ba9847b4bf8ed7f77b18bc8d"
}
},
"47f6d7d3726c46c283a8d9a1ff124153": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "VBoxModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"children": [
"IPY_MODEL_b915319ef8e44c8da6ac327e7e289a57"
],
"layout": "IPY_MODEL_41e0f89e13d44231a2bcefd3e615023d"
}
},
"56424e1e9f4c42078cd03f0e375e7c87": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "LayoutModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0"
}
},
"74f5dfb7a6d74d85a0de44892014cfac": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "LayoutModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0"
}
},
"a9529d3714a74e13b98173df9c5ae070": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "LayoutModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0"
}
},
"b42ce77275ab49eea9cc7b255a2bdf2e": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "HTMLModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"layout": "IPY_MODEL_f845e37ba4664f0c9fc6db8c5ecd0899",
"placeholder": "\\u200b",
"value": "\n <style>\n .ttip { position: relative; display: inline-block; }\n .ttip .ttiptext { visibility: hidden; background-color: #F8F8F8; outline: #CCCCCC solid thin;\n color: black; border-radius: 2px; padding: 2px; text-align: center;\n position: absolute; left: 53%; top: 30px; box-shadow: 7px 7px 10px #DDDDDD;\n z-index: 100; min-width: 100px; font-size: 80%}\n .ttip:hover .ttiptext { visibility: visible; }\n .widget-dropdown .dropdown-menu { width: 100% }\n .widget-select-multiple select { min-height: 100px; min-width: 300px;}\n </style>\n <div class=\"ttip\"><b>DynamicWrapper01525</b></div>"
}
},
"b915319ef8e44c8da6ac327e7e289a57": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "HTMLModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module": "activehtml",
"_view_module_version": "~2.1.0",
"_view_name": "ActiveHTMLView",
"layout": "IPY_MODEL_74f5dfb7a6d74d85a0de44892014cfac",
"placeholder": "\\u200b",
"value": "\n\n <div class=\"bk-root\">\n <div class=\"bk-plotdiv\" id=\"bd73b3d7-ddeb-4995-85c0-dd44e123f02d\"></div>\n </div>\n<script type=\"text/javascript\">\n \n (function(global) {\n function now() {\n return new Date();\n }\n \n var force = false;\n \n if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n window._bokeh_onload_callbacks = [];\n window._bokeh_is_loading = undefined;\n }\n \n \n \n if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n window._bokeh_timeout = Date.now() + 0;\n window._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 (window.Bokeh !== undefined) {\n document.getElementById(\"bd73b3d7-ddeb-4995-85c0-dd44e123f02d\").textContent = \"BokehJS successfully loaded.\";\n } else if (Date.now() < window._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }if ((window.Jupyter !== undefined) && Jupyter.notebook.kernel) {\n comm_manager = Jupyter.notebook.kernel.comm_manager\n comm_manager.register_target(\"6a91d710bf1b47989537d406980600b6\", function () {});\n }\n \n function run_callbacks() {\n window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n delete window._bokeh_onload_callbacks\n console.info(\"Bokeh: all callbacks have finished\");\n }\n \n function load_libs(js_urls, callback) {\n window._bokeh_onload_callbacks.push(callback);\n if (window._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 window._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 window._bokeh_is_loading--;\n if (window._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(\"bd73b3d7-ddeb-4995-85c0-dd44e123f02d\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid 'bd73b3d7-ddeb-4995-85c0-dd44e123f02d' but no matching script tag was found. \")\n return false;\n }\n \n var js_urls = [];\n \n var inline_js = [\n function(Bokeh) {\n (function() {\n var fn = function() {\n var docs_json = {\"c4ec2f82-c5ea-43f7-a437-bcfaa4647435\":{\"roots\":{\"references\":[{\"attributes\":{},\"id\":\"a98b971f-c414-4473-a587-0f5bdfd7f388\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"plot\":null,\"text\":\"Magnitude: 0\",\"text_color\":{\"value\":\"black\"},\"text_font_size\":{\"value\":\"12pt\"}},\"id\":\"5836f2c3-1c1d-4e9f-94c0-ce9028154400\",\"type\":\"Title\"},{\"attributes\":{\"line_color\":{\"value\":\"#30a2da\"},\"line_width\":{\"value\":2},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"d001b862-d9bc-42e0-af4a-395cfe5ae16c\",\"type\":\"Line\"},{\"attributes\":{\"overlay\":{\"id\":\"95ffcbdd-4707-44d7-86b1-693313b4f586\",\"type\":\"BoxAnnotation\"},\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"0654b8bc-a9e9-4657-a823-5d44f1fe7f6f\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"callback\":null,\"end\":9.0},\"id\":\"3763baad-b711-4608-8ada-a9d6d088d3d2\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"4546ebc8-ecf5-41b7-99bc-7004787c9532\",\"type\":\"ToolEvents\"},{\"attributes\":{\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"line_width\":{\"value\":2},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"bf8bd989-3eee-4f24-a65e-1cced7c5400e\",\"type\":\"Line\"},{\"attributes\":{\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"a47c081b-f564-4792-ab62-b12dadece513\",\"type\":\"ResetTool\"},{\"attributes\":{\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"896d10d3-a8e6-4470-a1c7-80c511a1965e\",\"type\":\"SaveTool\"},{\"attributes\":{\"axis_label\":\"y\",\"formatter\":{\"id\":\"a98b971f-c414-4473-a587-0f5bdfd7f388\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"d229d6e1-196e-4282-a867-07551a70c495\",\"type\":\"BasicTicker\"}},\"id\":\"ebfa80f8-dc09-4a66-bad7-ebcb641a552d\",\"type\":\"LinearAxis\"},{\"attributes\":{\"callback\":null,\"end\":0.9433841709485679,\"start\":0.028451572077616616},\"id\":\"a768a548-9355-43c7-a9b5-836654f3ce3b\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"97309584-e8a1-4cc9-9ea9-a524cad38c56\",\"type\":\"BasicTicker\"},{\"attributes\":{\"axis_label\":\"x\",\"formatter\":{\"id\":\"26645ad5-135b-4f6f-bc3f-6d45cbf64805\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"97309584-e8a1-4cc9-9ea9-a524cad38c56\",\"type\":\"BasicTicker\"}},\"id\":\"516fa0d2-2990-4086-a877-3e8d4f37883f\",\"type\":\"LinearAxis\"},{\"attributes\":{\"background_fill_color\":{\"value\":\"white\"},\"below\":[{\"id\":\"516fa0d2-2990-4086-a877-3e8d4f37883f\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"ebfa80f8-dc09-4a66-bad7-ebcb641a552d\",\"type\":\"LinearAxis\"}],\"min_border_bottom\":10,\"min_border_left\":10,\"min_border_right\":10,\"min_border_top\":10,\"plot_height\":300,\"plot_width\":300,\"renderers\":[{\"id\":\"516fa0d2-2990-4086-a877-3e8d4f37883f\",\"type\":\"LinearAxis\"},{\"id\":\"0e1907d9-9f8a-4d4d-bcf2-b8465cdab9ac\",\"type\":\"Grid\"},{\"id\":\"ebfa80f8-dc09-4a66-bad7-ebcb641a552d\",\"type\":\"LinearAxis\"},{\"id\":\"c739caad-2092-4afa-8ec3-2eb794eee3e4\",\"type\":\"Grid\"},{\"id\":\"95ffcbdd-4707-44d7-86b1-693313b4f586\",\"type\":\"BoxAnnotation\"},{\"id\":\"191f39a5-89e2-4cf1-9785-dd7c89ed5348\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"5836f2c3-1c1d-4e9f-94c0-ce9028154400\",\"type\":\"Title\"},\"tool_events\":{\"id\":\"4546ebc8-ecf5-41b7-99bc-7004787c9532\",\"type\":\"ToolEvents\"},\"toolbar\":{\"id\":\"5a243433-9e01-44d0-bb2b-190562bdf304\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"3763baad-b711-4608-8ada-a9d6d088d3d2\",\"type\":\"Range1d\"},\"y_range\":{\"id\":\"a768a548-9355-43c7-a9b5-836654f3ce3b\",\"type\":\"Range1d\"}},\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"26645ad5-135b-4f6f-bc3f-6d45cbf64805\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"5f5ef1d8-22c4-4f9a-89af-061edb9ace7a\",\"type\":\"PanTool\"},{\"attributes\":{\"data_source\":{\"id\":\"4212498b-c507-424e-9fad-61ab3f4dfb8d\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"d001b862-d9bc-42e0-af4a-395cfe5ae16c\",\"type\":\"Line\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"bf8bd989-3eee-4f24-a65e-1cced7c5400e\",\"type\":\"Line\"},\"selection_glyph\":null},\"id\":\"191f39a5-89e2-4cf1-9785-dd7c89ed5348\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"x\"],\"data\":{\"x\":{\"__ndarray__\":\"AAAAAAAAAAAAAAAAAADwPwAAAAAAAABAAAAAAAAACEAAAAAAAAAQQAAAAAAAABRAAAAAAAAAGEAAAAAAAAAcQAAAAAAAACBAAAAAAAAAIkA=\",\"dtype\":\"float64\",\"shape\":[10]},\"y\":{\"__ndarray__\":\"NOlN9y5u1z/Y4htHvfe5P0kklpr5MOw/Blpr/8oD1T/0RzlvE7vAP/qnP5IoPek/HCZzNHM/3T/AYl+uaCKdP1hYvz5NyO0/tTg5ADQw7j8=\",\"dtype\":\"float64\",\"shape\":[10]}}},\"id\":\"4212498b-c507-424e-9fad-61ab3f4dfb8d\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"d229d6e1-196e-4282-a867-07551a70c495\",\"type\":\"BasicTicker\"}},\"id\":\"c739caad-2092-4afa-8ec3-2eb794eee3e4\",\"type\":\"Grid\"},{\"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\":\"95ffcbdd-4707-44d7-86b1-693313b4f586\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"97309584-e8a1-4cc9-9ea9-a524cad38c56\",\"type\":\"BasicTicker\"}},\"id\":\"0e1907d9-9f8a-4d4d-bcf2-b8465cdab9ac\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"d229d6e1-196e-4282-a867-07551a70c495\",\"type\":\"BasicTicker\"},{\"attributes\":{\"plot\":{\"id\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"6c5f2de9-b499-46af-9340-15b20f742ee1\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"896d10d3-a8e6-4470-a1c7-80c511a1965e\",\"type\":\"SaveTool\"},{\"id\":\"5f5ef1d8-22c4-4f9a-89af-061edb9ace7a\",\"type\":\"PanTool\"},{\"id\":\"6c5f2de9-b499-46af-9340-15b20f742ee1\",\"type\":\"WheelZoomTool\"},{\"id\":\"0654b8bc-a9e9-4657-a823-5d44f1fe7f6f\",\"type\":\"BoxZoomTool\"},{\"id\":\"a47c081b-f564-4792-ab62-b12dadece513\",\"type\":\"ResetTool\"}]},\"id\":\"5a243433-9e01-44d0-bb2b-190562bdf304\",\"type\":\"Toolbar\"}],\"root_ids\":[\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.4\"}};\n var render_items = [{\"docid\":\"c4ec2f82-c5ea-43f7-a437-bcfaa4647435\",\"elementid\":\"bd73b3d7-ddeb-4995-85c0-dd44e123f02d\",\"modelid\":\"02519c0c-c172-4940-a2d1-b4cbfdb6b3de\",\"notebook_comms_target\":\"6a91d710bf1b47989537d406980600b6\"}];\n \n Bokeh.embed.embed_items(docs_json, render_items);\n };\n if (document.readyState != \"loading\") fn();\n else document.addEventListener(\"DOMContentLoaded\", fn);\n })();\n },\n function(Bokeh) {\n }\n ];\n \n function run_inline_js() {\n \n if ((window.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i](window.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < window._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!window._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n window._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"bd73b3d7-ddeb-4995-85c0-dd44e123f02d\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n \n }\n \n if (window._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 }(this));\n</script>"
}
},
"c85ae757ba9847b4bf8ed7f77b18bc8d": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "LayoutModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0"
}
},
"d887372be1d24b03bae106f7e01e9647": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "FloatSliderModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"layout": "IPY_MODEL_a9529d3714a74e13b98173df9c5ae070",
"max": 10,
"step": 0.1
}
},
"eb8e49023dcf4c729be989e004cfd752": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "VBoxModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0",
"children": [
"IPY_MODEL_b42ce77275ab49eea9cc7b255a2bdf2e",
"IPY_MODEL_464f0939d730429ebb192f06cf019323"
],
"layout": "IPY_MODEL_41e0f89e13d44231a2bcefd3e615023d"
}
},
"f845e37ba4664f0c9fc6db8c5ecd0899": {
"model_module": "jupyter-js-widgets",
"model_module_version": "~2.1.0",
"model_name": "LayoutModel",
"state": {
"_model_module_version": "~2.1.0",
"_view_module_version": "~2.1.0"
}
}
},
"version_major": 1,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment