Last active
December 20, 2023 08:38
-
-
Save dinya/15ec3b0e31fd1aae18776da5de435c94 to your computer and use it in GitHub Desktop.
Equidistant axis ticks for Holoviews boxplot chart (boxwhisker)
This file contains 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": "markdown", | |
"id": "9fbd1298-12b9-49cf-b938-149c8f8a40a1", | |
"metadata": {}, | |
"source": [ | |
"After https://holoviews.org/gallery/demos/bokeh/boxplot_chart.html" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "f1d02aae-5e82-475a-9d68-0dfd16af546e", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"application/javascript": [ | |
"(function(root) {\n", | |
" function now() {\n", | |
" return new Date();\n", | |
" }\n", | |
"\n", | |
" var force = true;\n", | |
" var py_version = '3.3.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n", | |
" var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n", | |
" var reloading = false;\n", | |
" var Bokeh = root.Bokeh;\n", | |
" var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n", | |
"\n", | |
" if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n", | |
" root._bokeh_timeout = Date.now() + 5000;\n", | |
" root._bokeh_failed_load = false;\n", | |
" }\n", | |
"\n", | |
" function run_callbacks() {\n", | |
" try {\n", | |
" root._bokeh_onload_callbacks.forEach(function(callback) {\n", | |
" if (callback != null)\n", | |
" callback();\n", | |
" });\n", | |
" } finally {\n", | |
" delete root._bokeh_onload_callbacks;\n", | |
" }\n", | |
" console.debug(\"Bokeh: all callbacks have finished\");\n", | |
" }\n", | |
"\n", | |
" function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n", | |
" if (css_urls == null) css_urls = [];\n", | |
" if (js_urls == null) js_urls = [];\n", | |
" if (js_modules == null) js_modules = [];\n", | |
" if (js_exports == null) js_exports = {};\n", | |
"\n", | |
" root._bokeh_onload_callbacks.push(callback);\n", | |
"\n", | |
" if (root._bokeh_is_loading > 0) {\n", | |
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
" return null;\n", | |
" }\n", | |
" if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n", | |
" run_callbacks();\n", | |
" return null;\n", | |
" }\n", | |
" if (!reloading) {\n", | |
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
" }\n", | |
"\n", | |
" function on_load() {\n", | |
" root._bokeh_is_loading--;\n", | |
" if (root._bokeh_is_loading === 0) {\n", | |
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", | |
" run_callbacks()\n", | |
" }\n", | |
" }\n", | |
" window._bokeh_on_load = on_load\n", | |
"\n", | |
" function on_error() {\n", | |
" console.error(\"failed to load \" + url);\n", | |
" }\n", | |
"\n", | |
" var skip = [];\n", | |
" if (window.requirejs) {\n", | |
" window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n", | |
" require([\"jspanel\"], function(jsPanel) {\n", | |
"\twindow.jsPanel = jsPanel\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-modal\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-tooltip\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-hint\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-layout\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-contextmenu\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"jspanel-dock\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"gridstack\"], function(GridStack) {\n", | |
"\twindow.GridStack = GridStack\n", | |
"\ton_load()\n", | |
" })\n", | |
" require([\"notyf\"], function() {\n", | |
"\ton_load()\n", | |
" })\n", | |
" root._bokeh_is_loading = css_urls.length + 9;\n", | |
" } else {\n", | |
" root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n", | |
" }\n", | |
"\n", | |
" var existing_stylesheets = []\n", | |
" var links = document.getElementsByTagName('link')\n", | |
" for (var i = 0; i < links.length; i++) {\n", | |
" var link = links[i]\n", | |
" if (link.href != null) {\n", | |
"\texisting_stylesheets.push(link.href)\n", | |
" }\n", | |
" }\n", | |
" for (var i = 0; i < css_urls.length; i++) {\n", | |
" var url = css_urls[i];\n", | |
" if (existing_stylesheets.indexOf(url) !== -1) {\n", | |
"\ton_load()\n", | |
"\tcontinue;\n", | |
" }\n", | |
" const element = document.createElement(\"link\");\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.rel = \"stylesheet\";\n", | |
" element.type = \"text/css\";\n", | |
" element.href = url;\n", | |
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", | |
" document.body.appendChild(element);\n", | |
" } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n", | |
" var urls = ['https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n", | |
" for (var i = 0; i < urls.length; i++) {\n", | |
" skip.push(urls[i])\n", | |
" }\n", | |
" } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n", | |
" var urls = ['https://cdn.holoviz.org/panel/1.3.1/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n", | |
" for (var i = 0; i < urls.length; i++) {\n", | |
" skip.push(urls[i])\n", | |
" }\n", | |
" } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n", | |
" var urls = ['https://cdn.holoviz.org/panel/1.3.1/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n", | |
" for (var i = 0; i < urls.length; i++) {\n", | |
" skip.push(urls[i])\n", | |
" }\n", | |
" } var existing_scripts = []\n", | |
" var scripts = document.getElementsByTagName('script')\n", | |
" for (var i = 0; i < scripts.length; i++) {\n", | |
" var script = scripts[i]\n", | |
" if (script.src != null) {\n", | |
"\texisting_scripts.push(script.src)\n", | |
" }\n", | |
" }\n", | |
" for (var i = 0; i < js_urls.length; i++) {\n", | |
" var url = js_urls[i];\n", | |
" if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n", | |
"\tif (!window.requirejs) {\n", | |
"\t on_load();\n", | |
"\t}\n", | |
"\tcontinue;\n", | |
" }\n", | |
" var element = document.createElement('script');\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.async = false;\n", | |
" element.src = url;\n", | |
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" document.head.appendChild(element);\n", | |
" }\n", | |
" for (var i = 0; i < js_modules.length; i++) {\n", | |
" var url = js_modules[i];\n", | |
" if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n", | |
"\tif (!window.requirejs) {\n", | |
"\t on_load();\n", | |
"\t}\n", | |
"\tcontinue;\n", | |
" }\n", | |
" var element = document.createElement('script');\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.async = false;\n", | |
" element.src = url;\n", | |
" element.type = \"module\";\n", | |
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" document.head.appendChild(element);\n", | |
" }\n", | |
" for (const name in js_exports) {\n", | |
" var url = js_exports[name];\n", | |
" if (skip.indexOf(url) >= 0 || root[name] != null) {\n", | |
"\tif (!window.requirejs) {\n", | |
"\t on_load();\n", | |
"\t}\n", | |
"\tcontinue;\n", | |
" }\n", | |
" var element = document.createElement('script');\n", | |
" element.onerror = on_error;\n", | |
" element.async = false;\n", | |
" element.type = \"module\";\n", | |
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" element.textContent = `\n", | |
" import ${name} from \"${url}\"\n", | |
" window.${name} = ${name}\n", | |
" window._bokeh_on_load()\n", | |
" `\n", | |
" document.head.appendChild(element);\n", | |
" }\n", | |
" if (!js_urls.length && !js_modules.length) {\n", | |
" on_load()\n", | |
" }\n", | |
" };\n", | |
"\n", | |
" function inject_raw_css(css) {\n", | |
" const element = document.createElement(\"style\");\n", | |
" element.appendChild(document.createTextNode(css));\n", | |
" document.body.appendChild(element);\n", | |
" }\n", | |
"\n", | |
" var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.3.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.3.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.3.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.3.0.min.js\", \"https://cdn.holoviz.org/panel/1.3.1/dist/panel.min.js\"];\n", | |
" var js_modules = [];\n", | |
" var js_exports = {};\n", | |
" var css_urls = [];\n", | |
" var inline_js = [ function(Bokeh) {\n", | |
" Bokeh.set_log_level(\"info\");\n", | |
" },\n", | |
"function(Bokeh) {} // ensure no trailing comma for IE\n", | |
" ];\n", | |
"\n", | |
" function run_inline_js() {\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", | |
" }\n", | |
" // Cache old bokeh versions\n", | |
" if (Bokeh != undefined && !reloading) {\n", | |
"\tvar NewBokeh = root.Bokeh;\n", | |
"\tif (Bokeh.versions === undefined) {\n", | |
"\t Bokeh.versions = new Map();\n", | |
"\t}\n", | |
"\tif (NewBokeh.version !== Bokeh.version) {\n", | |
"\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n", | |
"\t}\n", | |
"\troot.Bokeh = Bokeh;\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", | |
" }\n", | |
" root._bokeh_is_initializing = false\n", | |
" }\n", | |
"\n", | |
" function load_or_wait() {\n", | |
" // Implement a backoff loop that tries to ensure we do not load multiple\n", | |
" // versions of Bokeh and its dependencies at the same time.\n", | |
" // In recent versions we use the root._bokeh_is_initializing flag\n", | |
" // to determine whether there is an ongoing attempt to initialize\n", | |
" // bokeh, however for backward compatibility we also try to ensure\n", | |
" // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n", | |
" // before older versions are fully initialized.\n", | |
" if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n", | |
" root._bokeh_is_initializing = false;\n", | |
" root._bokeh_onload_callbacks = undefined;\n", | |
" console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n", | |
" load_or_wait();\n", | |
" } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n", | |
" setTimeout(load_or_wait, 100);\n", | |
" } else {\n", | |
" Bokeh = root.Bokeh;\n", | |
" bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n", | |
" root._bokeh_is_initializing = true\n", | |
" root._bokeh_onload_callbacks = []\n", | |
" if (!reloading && (!bokeh_loaded || is_dev)) {\n", | |
"\troot.Bokeh = undefined;\n", | |
" }\n", | |
" load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n", | |
"\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
"\trun_inline_js();\n", | |
" });\n", | |
" }\n", | |
" }\n", | |
" // Give older versions of the autoload script a head-start to ensure\n", | |
" // they initialize before we start loading newer version.\n", | |
" setTimeout(load_or_wait, 100)\n", | |
"}(window));" | |
], | |
"application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n var py_version = '3.3.0'.replace('rc', '-rc.').replace('.dev', '-dev.');\n var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n var reloading = false;\n var Bokeh = root.Bokeh;\n var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n run_callbacks();\n return null;\n }\n if (!reloading) {\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error() {\n console.error(\"failed to load \" + url);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n require([\"jspanel\"], function(jsPanel) {\n\twindow.jsPanel = jsPanel\n\ton_load()\n })\n require([\"jspanel-modal\"], function() {\n\ton_load()\n })\n require([\"jspanel-tooltip\"], function() {\n\ton_load()\n })\n require([\"jspanel-hint\"], function() {\n\ton_load()\n })\n require([\"jspanel-layout\"], function() {\n\ton_load()\n })\n require([\"jspanel-contextmenu\"], function() {\n\ton_load()\n })\n require([\"jspanel-dock\"], function() {\n\ton_load()\n })\n require([\"gridstack\"], function(GridStack) {\n\twindow.GridStack = GridStack\n\ton_load()\n })\n require([\"notyf\"], function() {\n\ton_load()\n })\n root._bokeh_is_loading = css_urls.length + 9;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n var existing_stylesheets = []\n var links = document.getElementsByTagName('link')\n for (var i = 0; i < links.length; i++) {\n var link = links[i]\n if (link.href != null) {\n\texisting_stylesheets.push(link.href)\n }\n }\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n if (existing_stylesheets.indexOf(url) !== -1) {\n\ton_load()\n\tcontinue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.3.1/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.3.1/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.3.1/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } var existing_scripts = []\n var scripts = document.getElementsByTagName('script')\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n\texisting_scripts.push(script.src)\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (const name in js_exports) {\n var url = js_exports[name];\n if (skip.indexOf(url) >= 0 || root[name] != null) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\n }\n var element = document.createElement('script');\n element.onerror = on_error;\n element.async = false;\n element.type = \"module\";\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n element.textContent = `\n import ${name} from \"${url}\"\n window.${name} = ${name}\n window._bokeh_on_load()\n `\n document.head.appendChild(element);\n }\n if (!js_urls.length && !js_modules.length) {\n on_load()\n }\n };\n\n function inject_raw_css(css) {\n const element = document.createElement(\"style\");\n element.appendChild(document.createTextNode(css));\n document.body.appendChild(element);\n }\n\n var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.3.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.3.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.3.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.3.0.min.js\", \"https://cdn.holoviz.org/panel/1.3.1/dist/panel.min.js\"];\n var js_modules = [];\n var js_exports = {};\n var css_urls = [];\n var inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\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 }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n\tvar NewBokeh = root.Bokeh;\n\tif (Bokeh.versions === undefined) {\n\t Bokeh.versions = new Map();\n\t}\n\tif (NewBokeh.version !== Bokeh.version) {\n\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n\t}\n\troot.Bokeh = Bokeh;\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 }\n root._bokeh_is_initializing = false\n }\n\n function load_or_wait() {\n // Implement a backoff loop that tries to ensure we do not load multiple\n // versions of Bokeh and its dependencies at the same time.\n // In recent versions we use the root._bokeh_is_initializing flag\n // to determine whether there is an ongoing attempt to initialize\n // bokeh, however for backward compatibility we also try to ensure\n // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n // before older versions are fully initialized.\n if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\n console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n load_or_wait();\n } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n setTimeout(load_or_wait, 100);\n } else {\n Bokeh = root.Bokeh;\n bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n if (!reloading && (!bokeh_loaded || is_dev)) {\n\troot.Bokeh = undefined;\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n\trun_inline_js();\n });\n }\n }\n // Give older versions of the autoload script a head-start to ensure\n // they initialize before we start loading newer version.\n setTimeout(load_or_wait, 100)\n}(window));" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/javascript": [ | |
"\n", | |
"if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n", | |
" window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n", | |
"}\n", | |
"\n", | |
"\n", | |
" function JupyterCommManager() {\n", | |
" }\n", | |
"\n", | |
" JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n", | |
" if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", | |
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", | |
" comm_manager.register_target(comm_id, function(comm) {\n", | |
" comm.on_msg(msg_handler);\n", | |
" });\n", | |
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", | |
" window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n", | |
" comm.onMsg = msg_handler;\n", | |
" });\n", | |
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", | |
" google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n", | |
" var messages = comm.messages[Symbol.asyncIterator]();\n", | |
" function processIteratorResult(result) {\n", | |
" var message = result.value;\n", | |
" console.log(message)\n", | |
" var content = {data: message.data, comm_id};\n", | |
" var buffers = []\n", | |
" for (var buffer of message.buffers || []) {\n", | |
" buffers.push(new DataView(buffer))\n", | |
" }\n", | |
" var metadata = message.metadata || {};\n", | |
" var msg = {content, buffers, metadata}\n", | |
" msg_handler(msg);\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" }\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" })\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n", | |
" if (comm_id in window.PyViz.comms) {\n", | |
" return window.PyViz.comms[comm_id];\n", | |
" } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n", | |
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n", | |
" var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n", | |
" if (msg_handler) {\n", | |
" comm.on_msg(msg_handler);\n", | |
" }\n", | |
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n", | |
" var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n", | |
" comm.open();\n", | |
" if (msg_handler) {\n", | |
" comm.onMsg = msg_handler;\n", | |
" }\n", | |
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n", | |
" var comm_promise = google.colab.kernel.comms.open(comm_id)\n", | |
" comm_promise.then((comm) => {\n", | |
" window.PyViz.comms[comm_id] = comm;\n", | |
" if (msg_handler) {\n", | |
" var messages = comm.messages[Symbol.asyncIterator]();\n", | |
" function processIteratorResult(result) {\n", | |
" var message = result.value;\n", | |
" var content = {data: message.data};\n", | |
" var metadata = message.metadata || {comm_id};\n", | |
" var msg = {content, metadata}\n", | |
" msg_handler(msg);\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" }\n", | |
" return messages.next().then(processIteratorResult);\n", | |
" }\n", | |
" }) \n", | |
" var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n", | |
" return comm_promise.then((comm) => {\n", | |
" comm.send(data, metadata, buffers, disposeOnDone);\n", | |
" });\n", | |
" };\n", | |
" var comm = {\n", | |
" send: sendClosure\n", | |
" };\n", | |
" }\n", | |
" window.PyViz.comms[comm_id] = comm;\n", | |
" return comm;\n", | |
" }\n", | |
" window.PyViz.comm_manager = new JupyterCommManager();\n", | |
" \n", | |
"\n", | |
"\n", | |
"var JS_MIME_TYPE = 'application/javascript';\n", | |
"var HTML_MIME_TYPE = 'text/html';\n", | |
"var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n", | |
"var CLASS_NAME = 'output';\n", | |
"\n", | |
"/**\n", | |
" * Render data to the DOM node\n", | |
" */\n", | |
"function render(props, node) {\n", | |
" var div = document.createElement(\"div\");\n", | |
" var script = document.createElement(\"script\");\n", | |
" node.appendChild(div);\n", | |
" node.appendChild(script);\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Handle when a new output is added\n", | |
" */\n", | |
"function handle_add_output(event, handle) {\n", | |
" var output_area = handle.output_area;\n", | |
" var output = handle.output;\n", | |
" if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
" return\n", | |
" }\n", | |
" var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
" var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
" if (id !== undefined) {\n", | |
" var nchildren = toinsert.length;\n", | |
" var html_node = toinsert[nchildren-1].children[0];\n", | |
" html_node.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
" var scripts = [];\n", | |
" var nodelist = html_node.querySelectorAll(\"script\");\n", | |
" for (var i in nodelist) {\n", | |
" if (nodelist.hasOwnProperty(i)) {\n", | |
" scripts.push(nodelist[i])\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" scripts.forEach( function (oldScript) {\n", | |
" var newScript = document.createElement(\"script\");\n", | |
" var attrs = [];\n", | |
" var nodemap = oldScript.attributes;\n", | |
" for (var j in nodemap) {\n", | |
" if (nodemap.hasOwnProperty(j)) {\n", | |
" attrs.push(nodemap[j])\n", | |
" }\n", | |
" }\n", | |
" attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n", | |
" newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n", | |
" oldScript.parentNode.replaceChild(newScript, oldScript);\n", | |
" });\n", | |
" if (JS_MIME_TYPE in output.data) {\n", | |
" toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n", | |
" }\n", | |
" output_area._hv_plot_id = id;\n", | |
" if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n", | |
" window.PyViz.plot_index[id] = Bokeh.index[id];\n", | |
" } else {\n", | |
" window.PyViz.plot_index[id] = null;\n", | |
" }\n", | |
" } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
" var bk_div = document.createElement(\"div\");\n", | |
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
" var script_attrs = bk_div.children[0].attributes;\n", | |
" for (var i = 0; i < script_attrs.length; i++) {\n", | |
" toinsert[toinsert.length - 1].childNodes[1].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", | |
"/**\n", | |
" * Handle when an output is cleared or removed\n", | |
" */\n", | |
"function handle_clear_output(event, handle) {\n", | |
" var id = handle.cell.output_area._hv_plot_id;\n", | |
" var server_id = handle.cell.output_area._bokeh_server_id;\n", | |
" if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n", | |
" var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n", | |
" if (server_id !== null) {\n", | |
" comm.send({event_type: 'server_delete', 'id': server_id});\n", | |
" return;\n", | |
" } else if (comm !== null) {\n", | |
" comm.send({event_type: 'delete', 'id': id});\n", | |
" }\n", | |
" delete PyViz.plot_index[id];\n", | |
" if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n", | |
" var doc = window.Bokeh.index[id].model.document\n", | |
" doc.clear();\n", | |
" const i = window.Bokeh.documents.indexOf(doc);\n", | |
" if (i > -1) {\n", | |
" window.Bokeh.documents.splice(i, 1);\n", | |
" }\n", | |
" }\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Handle kernel restart event\n", | |
" */\n", | |
"function handle_kernel_cleanup(event, handle) {\n", | |
" delete PyViz.comms[\"hv-extension-comm\"];\n", | |
" window.PyViz.plot_index = {}\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Handle update_display_data messages\n", | |
" */\n", | |
"function handle_update_output(event, handle) {\n", | |
" handle_clear_output(event, {cell: {output_area: handle.output_area}})\n", | |
" handle_add_output(event, handle)\n", | |
"}\n", | |
"\n", | |
"function register_renderer(events, OutputArea) {\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", | |
" events.on('output_added.OutputArea', handle_add_output);\n", | |
" events.on('output_updated.OutputArea', handle_update_output);\n", | |
" events.on('clear_output.CodeCell', handle_clear_output);\n", | |
" events.on('delete.Cell', handle_clear_output);\n", | |
" events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n", | |
"\n", | |
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
" safe: true,\n", | |
" index: 0\n", | |
" });\n", | |
"}\n", | |
"\n", | |
"if (window.Jupyter !== undefined) {\n", | |
" try {\n", | |
" var events = require('base/js/events');\n", | |
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
" register_renderer(events, OutputArea);\n", | |
" }\n", | |
" } catch(err) {\n", | |
" }\n", | |
"}\n" | |
], | |
"application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction handle_add_output(event, handle) {\n var output_area = handle.output_area;\n var output = handle.output;\n if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n return\n }\n var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n if (id !== undefined) {\n var nchildren = toinsert.length;\n var html_node = toinsert[nchildren-1].children[0];\n html_node.innerHTML = output.data[HTML_MIME_TYPE];\n var scripts = [];\n var nodelist = html_node.querySelectorAll(\"script\");\n for (var i in nodelist) {\n if (nodelist.hasOwnProperty(i)) {\n scripts.push(nodelist[i])\n }\n }\n\n scripts.forEach( function (oldScript) {\n var newScript = document.createElement(\"script\");\n var attrs = [];\n var nodemap = oldScript.attributes;\n for (var j in nodemap) {\n if (nodemap.hasOwnProperty(j)) {\n attrs.push(nodemap[j])\n }\n }\n attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n if (JS_MIME_TYPE in output.data) {\n toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n }\n output_area._hv_plot_id = id;\n if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n window.PyViz.plot_index[id] = Bokeh.index[id];\n } else {\n window.PyViz.plot_index[id] = null;\n }\n } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n var bk_div = document.createElement(\"div\");\n bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n var script_attrs = bk_div.children[0].attributes;\n for (var i = 0; i < script_attrs.length; i++) {\n toinsert[toinsert.length - 1].childNodes[1].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/**\n * Handle when an output is cleared or removed\n */\nfunction handle_clear_output(event, handle) {\n var id = handle.cell.output_area._hv_plot_id;\n var server_id = handle.cell.output_area._bokeh_server_id;\n if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n if (server_id !== null) {\n comm.send({event_type: 'server_delete', 'id': server_id});\n return;\n } else if (comm !== null) {\n comm.send({event_type: 'delete', 'id': id});\n }\n delete PyViz.plot_index[id];\n if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n var doc = window.Bokeh.index[id].model.document\n doc.clear();\n const i = window.Bokeh.documents.indexOf(doc);\n if (i > -1) {\n window.Bokeh.documents.splice(i, 1);\n }\n }\n}\n\n/**\n * Handle kernel restart event\n */\nfunction handle_kernel_cleanup(event, handle) {\n delete PyViz.comms[\"hv-extension-comm\"];\n window.PyViz.plot_index = {}\n}\n\n/**\n * Handle update_display_data messages\n */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction register_renderer(events, OutputArea) {\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 events.on('output_added.OutputArea', handle_add_output);\n events.on('output_updated.OutputArea', handle_update_output);\n events.on('clear_output.CodeCell', handle_clear_output);\n events.on('delete.Cell', handle_clear_output);\n events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n\n OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n safe: true,\n index: 0\n });\n}\n\nif (window.Jupyter !== undefined) {\n try {\n var events = require('base/js/events');\n var OutputArea = require('notebook/js/outputarea').OutputArea;\n if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n register_renderer(events, OutputArea);\n }\n } catch(err) {\n }\n}\n" | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"text/html": [ | |
"<style>*[data-root-id],\n", | |
"*[data-root-id] > * {\n", | |
" box-sizing: border-box;\n", | |
" font-family: var(--jp-ui-font-family);\n", | |
" font-size: var(--jp-ui-font-size1);\n", | |
" color: var(--vscode-editor-foreground, var(--jp-ui-font-color1));\n", | |
"}\n", | |
"\n", | |
"/* Override VSCode background color */\n", | |
".cell-output-ipywidget-background:has(\n", | |
" > .cell-output-ipywidget-background > .lm-Widget > *[data-root-id]\n", | |
" ),\n", | |
".cell-output-ipywidget-background:has(> .lm-Widget > *[data-root-id]) {\n", | |
" background-color: transparent !important;\n", | |
"}\n", | |
"</style>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/vnd.holoviews_exec.v0+json": "", | |
"text/html": [ | |
"<div id='p1002'>\n", | |
" <div id=\"dd2ea39c-4dc7-467a-8825-c92155039ff1\" data-root-id=\"p1002\" style=\"display: contents;\"></div>\n", | |
"</div>\n", | |
"<script type=\"application/javascript\">(function(root) {\n", | |
" var docs_json = {\"6978cc48-d06e-4cb6-8332-799b636e6089\":{\"version\":\"3.3.0\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"panel.models.browser.BrowserInfo\",\"id\":\"p1002\"},{\"type\":\"object\",\"name\":\"panel.models.comm_manager.CommManager\",\"id\":\"p1003\",\"attributes\":{\"plot_id\":\"p1002\",\"comm_id\":\"5db220a9b9544b068f19aea8ea6c33f0\",\"client_comm_id\":\"1a7a1ce0adf24080917d0513ba2037a6\"}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"toggle_value1\",\"properties\":[{\"name\":\"active_icons\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"options\",\"kind\":\"Any\",\"default\":{\"type\":\"map\",\"entries\":[[\"favorite\",\"heart\"]]}},{\"name\":\"value\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"_reactions\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"_base_url\",\"kind\":\"Any\",\"default\":\"https://tabler-icons.io/static/tabler-icons/icons/\"}]},{\"type\":\"model\",\"name\":\"copy_to_clipboard1\",\"properties\":[{\"name\":\"value\",\"kind\":\"Any\",\"default\":null},{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]}]}};\n", | |
" var render_items = [{\"docid\":\"6978cc48-d06e-4cb6-8332-799b636e6089\",\"roots\":{\"p1002\":\"dd2ea39c-4dc7-467a-8825-c92155039ff1\"},\"root_ids\":[\"p1002\"]}];\n", | |
" var docs = Object.values(docs_json)\n", | |
" if (!docs) {\n", | |
" return\n", | |
" }\n", | |
" const py_version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')\n", | |
" const is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1\n", | |
" function embed_document(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
" for (const render_item of render_items) {\n", | |
" for (const root_id of render_item.root_ids) {\n", | |
"\tconst id_el = document.getElementById(root_id)\n", | |
"\tif (id_el.children.length && (id_el.children[0].className === 'bk-root')) {\n", | |
"\t const root_el = id_el.children[0]\n", | |
"\t root_el.id = root_el.id + '-rendered'\n", | |
"\t}\n", | |
" }\n", | |
" }\n", | |
" }\n", | |
" function get_bokeh(root) {\n", | |
" if (root.Bokeh === undefined) {\n", | |
" return null\n", | |
" } else if (root.Bokeh.version !== py_version && !is_dev) {\n", | |
" if (root.Bokeh.versions === undefined || !root.Bokeh.versions.has(py_version)) {\n", | |
"\treturn null\n", | |
" }\n", | |
" return root.Bokeh.versions.get(py_version);\n", | |
" } else if (root.Bokeh.version === py_version) {\n", | |
" return root.Bokeh\n", | |
" }\n", | |
" return null\n", | |
" }\n", | |
" function is_loaded(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" return (Bokeh != null && Bokeh.Panel !== undefined)\n", | |
" }\n", | |
" if (is_loaded(root)) {\n", | |
" embed_document(root);\n", | |
" } else {\n", | |
" var attempts = 0;\n", | |
" var timer = setInterval(function(root) {\n", | |
" if (is_loaded(root)) {\n", | |
" clearInterval(timer);\n", | |
" embed_document(root);\n", | |
" } else if (document.readyState == \"complete\") {\n", | |
" attempts++;\n", | |
" if (attempts > 200) {\n", | |
" clearInterval(timer);\n", | |
"\t var Bokeh = get_bokeh(root)\n", | |
"\t if (Bokeh == null || Bokeh.Panel == null) {\n", | |
" console.warn(\"Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing\");\n", | |
"\t } else {\n", | |
"\t console.warn(\"Panel: WARNING: Attempting to render but not all required libraries could be resolved.\")\n", | |
"\t embed_document(root)\n", | |
"\t }\n", | |
" }\n", | |
" }\n", | |
" }, 25, root)\n", | |
" }\n", | |
"})(window);</script>" | |
] | |
}, | |
"metadata": { | |
"application/vnd.holoviews_exec.v0+json": { | |
"id": "p1002" | |
} | |
}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"text/html": [ | |
"\n", | |
"<div class=\"logo-block\">\n", | |
"<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n", | |
"AAAB+wAAAfsBxc2miwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA6zSURB\n", | |
"VHic7ZtpeFRVmsf/5966taWqUlUJ2UioBBJiIBAwCZtog9IOgjqACsogKtqirT2ttt069nQ/zDzt\n", | |
"tI4+CrJIREFaFgWhBXpUNhHZQoKBkIUASchWla1S+3ar7r1nPkDaCAnZKoQP/D7mnPOe9/xy76n3\n", | |
"nFSAW9ziFoPFNED2LLK5wcyBDObkb8ZkxuaoSYlI6ZcOKq1eWFdedqNzGHQBk9RMEwFAASkk0Xw3\n", | |
"ETacDNi2vtvc7L0ROdw0AjoSotQVkKSvHQz/wRO1lScGModBFbDMaNRN1A4tUBCS3lk7BWhQkgpD\n", | |
"lG4852/+7DWr1R3uHAZVQDsbh6ZPN7CyxUrCzJMRouusj0ipRwD2uKm0Zn5d2dFwzX1TCGhnmdGo\n", | |
"G62Nna+isiUqhkzuKrkQaJlPEv5mFl2fvGg2t/VnzkEV8F5ioioOEWkLG86fvbpthynjdhXYZziQ\n", | |
"x1hC9J2NFyi8vCTt91Fh04KGip0AaG9zuCk2wQCVyoNU3Hjezee9bq92duzzTmxsRJoy+jEZZZYo\n", | |
"GTKJ6SJngdJqAfRzpze0+jHreUtPc7gpBLQnIYK6BYp/uGhw9YK688eu7v95ysgshcg9qSLMo3JC\n", | |
"4jqLKQFBgdKDPoQ+Pltb8dUyQLpeDjeVgI6EgLIQFT5tEl3rn2losHVsexbZ3EyT9wE1uGdkIPcy\n", | |
"BGxn8QUq1QrA5nqW5i2tLqvrrM9NK6AdkVIvL9E9bZL/oyfMVd/jqvc8LylzRBKDJSzIExwhQzuL\n", | |
"QYGQj4rHfFTc8mUdu3E7yoLtbTe9gI4EqVgVkug2i5+uXGo919ixbRog+3fTbQ8qJe4ZOYNfMoTI\n", | |
"OoshUNosgO60AisX15aeI2PSIp5KiFLI9ubb1vV3Qb2ltwLakUCDAkWX7/nHKRmmGIl9VgYsUhJm\n", | |
"2NXjKYADtM1ygne9QQDIXlk49FBstMKx66D1v4+XuQr7vqTe0VcBHQlRWiOCbmmSYe2SqtL6q5rJ\n", | |
"zsTb7lKx3FKOYC4DoqyS/B5bvLPxvD9Qtf6saxYLQGJErmDOdOMr/zo96km1nElr8bmPOBwI9COv\n", | |
"HnFPRIwmkSOv9kcAS4heRsidOkpeWBgZM+UBrTFAXNYL5Vf2ii9c1trNzpYdaoVil3WIc+wdk+gQ\n", | |
"noie3ecCcxt9ITcLAPWt/laGEO/9U6PmzZkenTtsSMQ8uYywJVW+grCstAvCIaAdArAsIWkRDDs/\n", | |
"KzLm2YcjY1Lv0UdW73HabE9n6V66cxSzfEmuJssTpKGVp+0vHq73FwL46eOjpMpbRAnNmJFrGJNu\n", | |
"Ukf9Yrz+3rghiumCKNXXWPhLYcjxGsIpoCMsIRoFITkW8AuyM8jC1+/QLx4bozCEJIq38+1rtpR6\n", | |
"V/yzb8eBlRb3fo5l783N0CWolAzJHaVNzkrTzlEp2bQ2q3TC5gn6wpnoQAmwSiGh2GitnTmVMc5O\n", | |
"UyfKWUKCIsU7+fZDKwqdT6DDpvkzAX4/+AMFjk0tDp5GRXLpQ2MUmhgDp5gxQT8+Y7hyPsMi8uxF\n", | |
"71H0oebujHALECjFKaW9Lm68n18wXp2kVzIcABytD5iXFzg+WVXkegpAsOOYziqo0OkK76GyquC3\n", | |
"ltZAzMhhqlSNmmWTE5T6e3IN05ITFLM4GdN0vtZ3ob8Jh1NAKXFbm5PtLU/eqTSlGjkNAJjdgn/N\n", | |
"aedXa0tdi7+t9G0FIF49rtMSEgAs1kDLkTPO7ebm4IUWeyh1bKomXqlgMG6kJmHcSM0clYLJ8XtR\n", | |
"1GTnbV3F6I5wCGikAb402npp1h1s7LQUZZSMIfALFOuL3UUrfnS8+rez7v9qcold5tilgHbO1fjK\n", | |
"9ubb17u9oshxzMiUBKXWqJNxd+fqb0tLVs4lILFnK71H0Ind7uiPgACVcFJlrb0tV6DzxqqTIhUM\n", | |
"CwDf1/rrVhTa33/3pGPxJYdQ2l2cbgVcQSosdx8uqnDtbGjh9SlDVSMNWhlnilfqZk42Th2ZpLpf\n", | |
"xrHec5e815zrr0dfBZSwzkZfqsv+1FS1KUknUwPARVvItfKUY+cn57yP7qv07UE3p8B2uhUwLk09\n", | |
"e0SCOrK+hbdYHYLjRIl71wWzv9jpEoeOHhGRrJAzyEyNiJuUqX0g2sBN5kGK6y2Blp5M3lsB9Qh4\n", | |
"y2Ja6x6+i0ucmKgwMATwhSjdUu49tKrQ/pvN5d53ml2CGwCmJipmKjgmyuaXzNeL2a0AkQ01Th5j\n", | |
"2DktO3Jyk8f9vcOBQHV94OK+fPumJmvQHxJoWkaKWq9Vs+yUsbq0zGT1I4RgeH2b5wef7+c7bl8F\n", | |
"eKgoHVVZa8ZPEORzR6sT1BzDUAD/d9F78e2Tzv99v8D+fLVTqAKAsbGamKey1Mt9Ann4eH3gTXTz\n", | |
"idWtAJ8PQWOk7NzSeQn/OTHDuEikVF1R4z8BQCy+6D1aWRfY0tTGG2OM8rRoPaeIj5ZHzJxszElN\n", | |
"VM8K8JS5WOfv8mzRnQAKoEhmt8gyPM4lU9SmBK1MCQBnW4KONT86v1hZ1PbwSXPw4JWussVjtH9Y\n", | |
"NCoiL9UoH/6PSu8jFrfY2t36erQHXLIEakMi1SydmzB31h3GGXFDFNPaK8Rme9B79Ixrd0WN+1ij\n", | |
"NRQ/doRmuFLBkHSTOm5GruG+pFjFdAmorG4IXH1Qua6ASniclfFtDYt+oUjKipPrCQB7QBQ2lrgP\n", | |
"fFzm+9XWUtcqJ3/5vDLDpJ79XHZk3u8nGZ42qlj1+ydtbxysCezrydp6ugmipNJ7WBPB5tydY0jP\n", | |
"HaVNzs3QzeE4ZpTbI+ZbnSFPbVOw9vsfnVvqWnirPyCNGD08IlqtYkh2hjZ5dErEQzoNm+6ykyOt\n", | |
"Lt5/PQEuSRRKo22VkydK+vvS1XEKlhCJAnsqvcVvH7f/ZU2R67eXbMEGAMiIV5oWZWiWvz5Fv2xG\n", | |
"sjqNJQRvn3Rs2lji/lNP19VjAQDgD7FHhujZB9OGqYxRkZxixgRDVlqS6uEOFaJUVu0rPFzctrnF\n", | |
"JqijImVp8dEKVWyUXDk92zAuMZ6bFwpBU1HrOw6AdhQgUooChb0+ItMbWJitSo5Ws3IAOGEOtL53\n", | |
"0vHZih9sC4vtofZ7Qu6523V/fmGcds1TY3V36pUsBwAbSlxnVh2xLfAD/IAIMDf7XYIkNmXfpp2l\n", | |
"18rkAJAy9HKFaIr/qULkeQQKy9zf1JgDB2uaeFNGijo5QsUyacNUUTOnGO42xSnv4oOwpDi1zYkc\n", | |
"efUc3I5Gk6PhyTuVKaOGyLUAYPGIoY9Pu/atL/L92+4q9wbflRJ2Trpm/jPjdBtfnqB/dIThcl8A\n", | |
"KG7hbRuKnb8qsQsVvVlTrwQAQMUlf3kwJI24Z4JhPMtcfng5GcH49GsrxJpGvvHIaeem2ma+KSjQ\n", | |
"lIwUdYyCY8j4dE1KzijNnIP2llF2wcXNnsoapw9XxsgYAl6k+KzUXbi2yP3KR2ecf6z3BFsBICdW\n", | |
"nvnIaG3eHybqX7vbpEqUMT+9OL4Qpe8VON7dXuFd39v19FoAABRVePbGGuXTszO0P7tu6lghUonE\n", | |
"llRdrhArLvmKdh9u29jcFiRRkfLUxBiFNiqSU9icoZQHo5mYBI1MBgBH6wMNb+U7Pnw337H4gi1Y\n", | |
"ciWs+uks3Z9fztUvfzxTm9Ne8XXkvQLHNytOOZeiD4e0PgkAIAYCYknKUNUDSXEKzdWNpnil7r4p\n", | |
"xqkjTarZMtk/K8TQ6Qve78qqvXurGwIJqcOUKfUWHsm8KGvxSP68YudXq4pcj39X49uOK2X142O0\n", | |
"Tz5/u/7TVybqH0rSya6ZBwD21/gubbrgWdDgEOx9WUhfBaC2ibcEBYm7a7x+ukrBMNcEZggyR0TE\n", | |
"T8zUPjikQ4VosQZbTpS4vqizBKvqmvjsqnpfzaZyx9JPiz1/bfGKdgD45XB1zoIMzYbfTdS/NClB\n", | |
"Gct0USiY3YL/g0LHy/uq/Ef6uo5+n0R/vyhp17Klpge763f8rMu6YU/zrn2nml+2WtH+Z+5IAAFc\n", | |
"2bUTdTDOSNa9+cQY7YLsOIXhevEkCvzph7a8laecz/Un/z4/Ae04XeL3UQb57IwU9ZDr9UuKVajv\n", | |
"nxp1+1UVIo/LjztZkKH59fO3G/JemqCfmaCRqbqbd90ZZ8FfjtkfAyD0J/9+C2h1hDwsSxvGjNDc\n", | |
"b4zk5NfrSwiQblLHzZhg+Jf4aPlUwpDqkQqa9nimbt1/TDH8OitGMaQnj+RJS6B1fbF7SY1TqO5v\n", | |
"/v0WAADl1f7zokgS7s7VT2DZ7pegUjBM7mjtiDZbcN4j0YrHH0rXpCtY0qPX0cVL0rv5jv/ZXend\n", | |
"0u/EESYBAFBU4T4Qa5TflZOhTe7pmKpaP8kCVUVw1+yhXfJWvn1P3hnXi33JsTN6PnP3hHZ8Z3/h\n", | |
"aLHzmkNPuPj7Bc/F/Q38CwjTpSwQXgE4Vmwry9tpfq/ZFgqFMy4AVDtCvi8rvMvOmv0N4YwbVgEA\n", | |
"sPM72/KVnzfspmH7HQGCRLG2yL1+z8XwvPcdCbsAANh+xPzstgMtxeGKt+6MK3/tacfvwhWvIwMi\n", | |
"oKEBtm0H7W+UVfkc/Y1V0BhoPlDr/w1w/eu1vjIgAgDg22OtX6/eYfnEz/focrZTHAFR+PSs56/7\n", | |
"q32nwpjazxgwAQCwcU/T62t3WL7r6/jVRa6/byp1rei+Z98ZUAEAhEPHPc8fKnTU9nbgtnOe8h0l\n", | |
"9hcGIqmODLQAHCy2Xti6v/XNRivf43f4fFvIteu854+VHnR7q9tfBlwAAGz+pnndB9vM26UebAe8\n", | |
"SLHujPOTPVW+rwY+sxskAAC2HrA8t2Vvc7ffP1r9o+vwR2dcr92InIAbKKC1FZ5tB1tf+/G8p8sv\n", | |
"N/9Q5zd/XR34LYCwV5JdccMEAMDBk45DH243r/X4xGvqxFa/GNpS7n6rwOwNWwHVE26oAADYurf1\n", | |
"zx/utOzt+DMKYM0p17YtZZ5VNzqfsB2HewG1WXE8PoZ7gOclbTIvynZf9JV+fqZtfgs/8F/Nu5rB\n", | |
"EIBmJ+8QRMmpU7EzGRsf2FzuePqYRbzh/zE26EwdrT10f6r6o8HOYzCJB9Dpff8tbnGLG8L/A/WE\n", | |
"roTBs2RqAAAAAElFTkSuQmCC'\n", | |
" style='height:25px; border-radius:12px; display: inline-block; float: left; vertical-align: middle'></img>\n", | |
"\n", | |
"\n", | |
" <img src='data:image/png;base64,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'\n", | |
" style='height:15px; border-radius:12px; display: inline-block; float: left'></img>\n", | |
" \n", | |
"\n", | |
"\n", | |
"\n", | |
"\n", | |
"</div>\n" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"from typing import Optional\n", | |
"\n", | |
"import numpy as np\n", | |
"import pandas as pd\n", | |
"\n", | |
"import holoviews as hv\n", | |
"from holoviews import dim\n", | |
"\n", | |
"from bokeh.sampledata.autompg import autompg as df\n", | |
"\n", | |
"hv.extension('bokeh')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "7cecd50b-5bae-4656-a044-ea7cd85831b5", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def plot(df: pd.DataFrame, date_label: str, hue_label: str, param_label: str, title: str = \"\") -> hv.BoxWhisker:\n", | |
" boxwhisker = hv.BoxWhisker(df, [date_label, hue_label], param_label, label=title)\n", | |
" boxwhisker.opts(\n", | |
" show_legend=False,\n", | |
" width=600,\n", | |
" box_fill_color=dim(hue_label).str(),\n", | |
" cmap='Set1',\n", | |
" show_grid=True\n", | |
" )\n", | |
" return boxwhisker" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "48e9bc94-762c-4ae9-95a9-8489cfb79fc0", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>mpg</th>\n", | |
" <th>cyl</th>\n", | |
" <th>displ</th>\n", | |
" <th>hp</th>\n", | |
" <th>weight</th>\n", | |
" <th>accel</th>\n", | |
" <th>yr</th>\n", | |
" <th>origin</th>\n", | |
" <th>name</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>18.0</td>\n", | |
" <td>8</td>\n", | |
" <td>307.0</td>\n", | |
" <td>130</td>\n", | |
" <td>3504</td>\n", | |
" <td>12.0</td>\n", | |
" <td>70</td>\n", | |
" <td>1</td>\n", | |
" <td>chevrolet chevelle malibu</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>15.0</td>\n", | |
" <td>8</td>\n", | |
" <td>350.0</td>\n", | |
" <td>165</td>\n", | |
" <td>3693</td>\n", | |
" <td>11.5</td>\n", | |
" <td>70</td>\n", | |
" <td>1</td>\n", | |
" <td>buick skylark 320</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>18.0</td>\n", | |
" <td>8</td>\n", | |
" <td>318.0</td>\n", | |
" <td>150</td>\n", | |
" <td>3436</td>\n", | |
" <td>11.0</td>\n", | |
" <td>70</td>\n", | |
" <td>1</td>\n", | |
" <td>plymouth satellite</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>16.0</td>\n", | |
" <td>8</td>\n", | |
" <td>304.0</td>\n", | |
" <td>150</td>\n", | |
" <td>3433</td>\n", | |
" <td>12.0</td>\n", | |
" <td>70</td>\n", | |
" <td>1</td>\n", | |
" <td>amc rebel sst</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>17.0</td>\n", | |
" <td>8</td>\n", | |
" <td>302.0</td>\n", | |
" <td>140</td>\n", | |
" <td>3449</td>\n", | |
" <td>10.5</td>\n", | |
" <td>70</td>\n", | |
" <td>1</td>\n", | |
" <td>ford torino</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" mpg cyl displ hp weight accel yr origin name\n", | |
"0 18.0 8 307.0 130 3504 12.0 70 1 chevrolet chevelle malibu\n", | |
"1 15.0 8 350.0 165 3693 11.5 70 1 buick skylark 320\n", | |
"2 18.0 8 318.0 150 3436 11.0 70 1 plymouth satellite\n", | |
"3 16.0 8 304.0 150 3433 12.0 70 1 amc rebel sst\n", | |
"4 17.0 8 302.0 140 3449 10.5 70 1 ford torino" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"id": "3b76ee1d-b2bd-41a5-94b2-5b2d19f392ad", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"date_label = \"cyl\"\n", | |
"hue_label = \"origin\"\n", | |
"param_label = \"mpg\"" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "715b4207-b3e5-4bf1-af30-43559ba20316", | |
"metadata": {}, | |
"source": [ | |
"# Without filling\n", | |
"\n", | |
"Original example from https://holoviews.org/gallery/demos/bokeh/boxplot_chart.html" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"id": "83b9e76f-f416-41fc-9c59-ecc16cf4c8bf", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"3 [3]\n", | |
"4 [3 2 1]\n", | |
"5 [2]\n", | |
"6 [1 3 2]\n", | |
"8 [1]\n" | |
] | |
} | |
], | |
"source": [ | |
"for date, df_date in df.groupby(by=date_label):\n", | |
" print(date, df_date[hue_label].unique())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"id": "44361dd0-eb73-4f72-b3a8-585a235c79e2", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": {}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/vnd.holoviews_exec.v0+json": "", | |
"text/html": [ | |
"<div id='p1004'>\n", | |
" <div id=\"a2c5cfeb-2bb1-4821-9f96-6230a8c77863\" data-root-id=\"p1004\" style=\"display: contents;\"></div>\n", | |
"</div>\n", | |
"<script type=\"application/javascript\">(function(root) {\n", | |
" var docs_json = {\"e512ba85-725c-40cb-aec6-46332411baff\":{\"version\":\"3.3.0\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Row\",\"id\":\"p1004\",\"attributes\":{\"name\":\"Row00887\",\"tags\":[\"embedded\"],\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1007\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/css/loading.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1137\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/css/listpanel.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1005\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/bundled/theme/default.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1006\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/bundled/theme/native.css\"}}],\"min_width\":600,\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\",\"children\":[{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"p1008\",\"attributes\":{\"name\":\"HSpacer00898\",\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"id\":\"p1007\"},{\"id\":\"p1005\"},{\"id\":\"p1006\"}],\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}},{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1015\",\"attributes\":{\"height\":300,\"margin\":[5,10],\"sizing_mode\":\"fixed\",\"align\":\"start\",\"x_range\":{\"type\":\"object\",\"name\":\"FactorRange\",\"id\":\"p1009\",\"attributes\":{\"tags\":[[[\"cyl\",\"cyl\",null],[\"origin\",\"origin\",null]],[]],\"factors\":[[\"3\",\"3\"],[\"4\",\"1\"],[\"4\",\"2\"],[\"4\",\"3\"],[\"5\",\"2\"],[\"6\",\"1\"],[\"6\",\"2\"],[\"6\",\"3\"],[\"8\",\"1\"]]}},\"y_range\":{\"type\":\"object\",\"name\":\"Range1d\",\"id\":\"p1010\",\"attributes\":{\"tags\":[[[\"mpg\",\"mpg\",null]],{\"type\":\"map\",\"entries\":[[\"invert_yaxis\",false],[\"autorange\",false]]}],\"start\":5.24,\"end\":50.36,\"reset_start\":5.24,\"reset_end\":50.36}},\"x_scale\":{\"type\":\"object\",\"name\":\"CategoricalScale\",\"id\":\"p1025\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1026\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1018\",\"attributes\":{\"text\":\"Without filling\",\"text_color\":\"black\",\"text_font_size\":\"12pt\"}},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1051\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1042\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1043\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1044\"},\"data\":{\"type\":\"map\",\"entries\":[[\"index\",[[\"8\",\"1\"],[\"8\",\"1\"],[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"6\",\"1\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"6\",\"3\"],[\"6\",\"2\"]]],[\"mpg\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAN0BmZmZmZuY3QJqZmZmZmTpAzczMzMxMR0DNzMzMzMw8QM3MzMzMzDpAAAAAAAAAQ0DNzMzMzIxFQAAAAAAAwERAZmZmZmYmRkAzMzMzM7NFQAAAAAAAAEZAmpmZmZlZQEAzMzMzM7M+QA==\"},\"shape\":[14],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1052\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1053\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1048\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1054\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"size\":{\"type\":\"value\",\"value\":4},\"angle\":{\"type\":\"value\",\"value\":0.0},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"},\"fill_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_color\":{\"type\":\"value\",\"value\":\"black\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_scale\":{\"type\":\"value\",\"value\":12.0},\"hatch_pattern\":{\"type\":\"value\",\"value\":null},\"hatch_weight\":{\"type\":\"value\",\"value\":1.0},\"radius\":{\"type\":\"value\",\"value\":null}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1049\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1050\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1064\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1055\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1056\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1057\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"]]],[\"y0\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzMzNEDNzMzMzExGQAAAAAAAADlAZmZmZmamQkAAAAAAAIBDQDMzMzMzszdAZmZmZmZmOUDNzMzMzGw0QDMzMzMzM0JA\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}],[\"x1\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"]]],[\"y1\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAMEAAAAAAAIBBQM3MzMzMzDRAAAAAAAAAPkBmZmZmZuY+QM3MzMzMDDZAmZmZmZkZOUDNzMzMzGw0QGZmZmZm5j5A\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1065\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1066\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1061\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1067\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1062\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1063\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1077\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1068\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1069\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1070\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"]]],[\"y0\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAIkAAAAAAAAA0QAAAAAAAAC5AAAAAAAAAMkAAAAAAAAAzQAAAAAAAADJAAAAAAAAAM0AzMzMzMzMwQM3MzMzMTDRA\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}],[\"x1\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"]]],[\"y1\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAKkAAAAAAAIA7QAAAAAAAADJAAAAAAAAAOEAAAAAAAAA5QAAAAAAAwDJAAAAAAACANEDNzMzMzGwwQJqZmZmZ2TZA\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1078\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1079\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1074\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1080\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1075\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1076\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1090\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1081\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1082\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1083\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\",-0.2],[\"4\",\"3\",-0.2],[\"6\",\"1\",-0.2],[\"4\",\"2\",-0.2],[\"4\",\"1\",-0.2],[\"3\",\"3\",-0.2],[\"6\",\"3\",-0.2],[\"6\",\"2\",-0.2],[\"5\",\"2\",-0.2]]],[\"y0\",[9.0,20.0,15.0,18.0,19.0,18.0,19.0,16.2,20.3]],[\"x1\",[[\"8\",\"1\",0.2],[\"4\",\"3\",0.2],[\"6\",\"1\",0.2],[\"4\",\"2\",0.2],[\"4\",\"1\",0.2],[\"3\",\"3\",0.2],[\"6\",\"3\",0.2],[\"6\",\"2\",0.2],[\"5\",\"2\",0.2]]],[\"y1\",[9.0,20.0,15.0,18.0,19.0,18.0,19.0,16.2,20.3]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1091\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1092\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1087\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1093\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1088\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1089\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1103\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1094\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1095\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1096\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\",-0.2],[\"4\",\"3\",-0.2],[\"6\",\"1\",-0.2],[\"4\",\"2\",-0.2],[\"4\",\"1\",-0.2],[\"3\",\"3\",-0.2],[\"6\",\"3\",-0.2],[\"6\",\"2\",-0.2],[\"5\",\"2\",-0.2]]],[\"y0\",[20.2,44.6,25.0,37.3,39.0,23.7,25.4,20.425,36.4]],[\"x1\",[[\"8\",\"1\",0.2],[\"4\",\"3\",0.2],[\"6\",\"1\",0.2],[\"4\",\"2\",0.2],[\"4\",\"1\",0.2],[\"3\",\"3\",0.2],[\"6\",\"3\",0.2],[\"6\",\"2\",0.2],[\"5\",\"2\",0.2]]],[\"y1\",[20.2,44.6,25.0,37.3,39.0,23.7,25.4,20.425,36.4]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1104\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1105\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1100\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1106\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1101\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1102\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1117\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1108\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1109\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1110\"},\"data\":{\"type\":\"map\",\"entries\":[[\"index\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"]]],[\"top\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAALEAAAAAAAABAQAAAAAAAADNAAAAAAAAAO0AzMzMzMzM7QAAAAAAAQDRAmpmZmZkZN0AAAAAAAMAwQGZmZmZmZjlA\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}],[\"bottom\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAMEAAAAAAAIBBQM3MzMzMzDRAAAAAAAAAPkBmZmZmZuY+QM3MzMzMDDZAmZmZmZkZOUDNzMzMzGw0QGZmZmZm5j5A\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}],[\"box_fill_color\",[\"1\",\"3\",\"1\",\"2\",\"1\",\"3\",\"3\",\"2\",\"2\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1118\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1119\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1114\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"type\":\"object\",\"name\":\"CategoricalColorMapper\",\"id\":\"p1107\",\"attributes\":{\"palette\":[\"#e41a1c\",\"#377eb8\",\"#4daf4a\"],\"factors\":[\"1\",\"3\",\"2\"]}}}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1120\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1107\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_color\":{\"type\":\"value\",\"value\":\"black\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_scale\":{\"type\":\"value\",\"value\":12.0},\"hatch_pattern\":{\"type\":\"value\",\"value\":null},\"hatch_weight\":{\"type\":\"value\",\"value\":1.0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1115\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1107\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1116\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1107\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1130\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1121\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1122\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1123\"},\"data\":{\"type\":\"map\",\"entries\":[[\"index\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"]]],[\"top\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAKkAAAAAAAIA7QAAAAAAAADJAAAAAAAAAOEAAAAAAAAA5QAAAAAAAwDJAAAAAAACANEDNzMzMzGwwQJqZmZmZ2TZA\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}],[\"bottom\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAALEAAAAAAAABAQAAAAAAAADNAAAAAAAAAO0AzMzMzMzM7QAAAAAAAQDRAmpmZmZkZN0AAAAAAAMAwQGZmZmZmZjlA\"},\"shape\":[9],\"dtype\":\"float64\",\"order\":\"little\"}],[\"box_fill_color\",[\"1\",\"3\",\"1\",\"2\",\"1\",\"3\",\"3\",\"2\",\"2\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1131\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1132\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1127\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1107\"}}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1133\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1107\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_color\":{\"type\":\"value\",\"value\":\"black\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_scale\":{\"type\":\"value\",\"value\":12.0},\"hatch_pattern\":{\"type\":\"value\",\"value\":null},\"hatch_weight\":{\"type\":\"value\",\"value\":1.0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1128\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1107\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1129\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1107\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1024\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1014\",\"attributes\":{\"tags\":[\"hv_created\"],\"renderers\":\"auto\",\"zoom_together\":\"none\"}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1037\"},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1038\"},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1039\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1040\",\"attributes\":{\"syncable\":false,\"level\":\"overlay\",\"visible\":false,\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1041\"}],\"active_drag\":{\"id\":\"p1038\"},\"active_scroll\":{\"id\":\"p1014\"}}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1032\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1033\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1034\"},\"axis_label\":\"mpg\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1035\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"CategoricalAxis\",\"id\":\"p1027\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"CategoricalTicker\",\"id\":\"p1028\"},\"formatter\":{\"type\":\"object\",\"name\":\"CategoricalTickFormatter\",\"id\":\"p1029\"},\"axis_label\":\"cyl, origin\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1030\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1031\",\"attributes\":{\"axis\":{\"id\":\"p1027\"},\"ticker\":{\"id\":\"p1028\"}}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1036\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1032\"},\"ticker\":{\"id\":\"p1033\"}}}],\"min_border_top\":10,\"min_border_bottom\":10,\"min_border_left\":10,\"min_border_right\":10,\"output_backend\":\"webgl\"}},{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"p1135\",\"attributes\":{\"name\":\"HSpacer00901\",\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"id\":\"p1007\"},{\"id\":\"p1005\"},{\"id\":\"p1006\"}],\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}}]}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"toggle_value1\",\"properties\":[{\"name\":\"active_icons\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"options\",\"kind\":\"Any\",\"default\":{\"type\":\"map\",\"entries\":[[\"favorite\",\"heart\"]]}},{\"name\":\"value\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"_reactions\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"_base_url\",\"kind\":\"Any\",\"default\":\"https://tabler-icons.io/static/tabler-icons/icons/\"}]},{\"type\":\"model\",\"name\":\"copy_to_clipboard1\",\"properties\":[{\"name\":\"value\",\"kind\":\"Any\",\"default\":null},{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]}]}};\n", | |
" var render_items = [{\"docid\":\"e512ba85-725c-40cb-aec6-46332411baff\",\"roots\":{\"p1004\":\"a2c5cfeb-2bb1-4821-9f96-6230a8c77863\"},\"root_ids\":[\"p1004\"]}];\n", | |
" var docs = Object.values(docs_json)\n", | |
" if (!docs) {\n", | |
" return\n", | |
" }\n", | |
" const py_version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')\n", | |
" const is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1\n", | |
" function embed_document(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
" for (const render_item of render_items) {\n", | |
" for (const root_id of render_item.root_ids) {\n", | |
"\tconst id_el = document.getElementById(root_id)\n", | |
"\tif (id_el.children.length && (id_el.children[0].className === 'bk-root')) {\n", | |
"\t const root_el = id_el.children[0]\n", | |
"\t root_el.id = root_el.id + '-rendered'\n", | |
"\t}\n", | |
" }\n", | |
" }\n", | |
" }\n", | |
" function get_bokeh(root) {\n", | |
" if (root.Bokeh === undefined) {\n", | |
" return null\n", | |
" } else if (root.Bokeh.version !== py_version && !is_dev) {\n", | |
" if (root.Bokeh.versions === undefined || !root.Bokeh.versions.has(py_version)) {\n", | |
"\treturn null\n", | |
" }\n", | |
" return root.Bokeh.versions.get(py_version);\n", | |
" } else if (root.Bokeh.version === py_version) {\n", | |
" return root.Bokeh\n", | |
" }\n", | |
" return null\n", | |
" }\n", | |
" function is_loaded(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" return (Bokeh != null && Bokeh.Panel !== undefined)\n", | |
" }\n", | |
" if (is_loaded(root)) {\n", | |
" embed_document(root);\n", | |
" } else {\n", | |
" var attempts = 0;\n", | |
" var timer = setInterval(function(root) {\n", | |
" if (is_loaded(root)) {\n", | |
" clearInterval(timer);\n", | |
" embed_document(root);\n", | |
" } else if (document.readyState == \"complete\") {\n", | |
" attempts++;\n", | |
" if (attempts > 200) {\n", | |
" clearInterval(timer);\n", | |
"\t var Bokeh = get_bokeh(root)\n", | |
"\t if (Bokeh == null || Bokeh.Panel == null) {\n", | |
" console.warn(\"Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing\");\n", | |
"\t } else {\n", | |
"\t console.warn(\"Panel: WARNING: Attempting to render but not all required libraries could be resolved.\")\n", | |
"\t embed_document(root)\n", | |
"\t }\n", | |
" }\n", | |
" }\n", | |
" }, 25, root)\n", | |
" }\n", | |
"})(window);</script>" | |
], | |
"text/plain": [ | |
":BoxWhisker [cyl,origin] (mpg)" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": { | |
"application/vnd.holoviews_exec.v0+json": { | |
"id": "p1004" | |
} | |
}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"plot(df=df, date_label=date_label, hue_label=hue_label, param_label=param_label, title=\"Without filling\")" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "4c4d0c9b-1d5c-4eee-9900-f57a2a71970e", | |
"metadata": {}, | |
"source": [ | |
"# With filling\n", | |
"\n", | |
"Add nulls to prettify plot (equdistant axis ticks)." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"id": "26f1f129-e1e5-43bf-979b-c3f20b07374c", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"def fill_na(df: pd.DataFrame, date_label: str, hue_label: str):\n", | |
" # Convert to pandas nullable types\n", | |
" # See also https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.convert_dtypes.html\n", | |
" # for col in df.columns:\n", | |
" # if df[col].dtype == \"float64\":\n", | |
" # df[col] = df[col].astype(\"Float64\")\n", | |
" # elif df[col].dtype == \"int64\":\n", | |
" # df[col] = df[col].astype(\"Int64\")\n", | |
" # elif df[col].dtype == \"object\":\n", | |
" # df[col] = df[col].astype(\"string\")\n", | |
" df = df.convert_dtypes()\n", | |
" \n", | |
" # Add null hues on current date\n", | |
" uique_hues = set(sorted(df[hue_label].unique()))\n", | |
" for date, df_date in df.groupby(by=date_label):\n", | |
" date_hue = set(df_date[hue_label].unique())\n", | |
" missing_hues = uique_hues - date_hue\n", | |
" for hue in missing_hues:\n", | |
" new_row = pd.Series(df.columns.shape[0] * [pd.NA, ], index=df.columns)\n", | |
" new_row[date_label] = date\n", | |
" new_row[hue_label] = hue\n", | |
" df = pd.concat([df, new_row.set_axis(df.columns).to_frame().T.astype(df.dtypes)], ignore_index=True)\n", | |
" #df.loc[len(df)] = new_row.values\n", | |
"\n", | |
" # Add null dates\n", | |
" unique_dates = set(sorted(df[date_label].unique()))\n", | |
" min_date = min(unique_dates)\n", | |
" max_date = max(unique_dates)\n", | |
" equidistant_dates = set(range(min_date, max_date + 1))\n", | |
" missing_dates = equidistant_dates - unique_dates\n", | |
" for date in missing_dates:\n", | |
" for hue in uique_hues:\n", | |
" new_row = pd.Series(df.columns.shape[0] * [pd.NA, ], index=df.columns)\n", | |
" new_row[date_label] = date\n", | |
" new_row[hue_label] = hue\n", | |
" df = pd.concat([df, new_row.set_axis(df.columns).to_frame().T.astype(df.dtypes)], ignore_index=True)\n", | |
" #df.loc[len(df)] = new_row.values\n", | |
" \n", | |
" # for date, df_date in df.groupby(by=date_label):\n", | |
" # print(date, df_date[hue_label].unique())\n", | |
" return df" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"id": "54a4ce02-d66c-4806-82dd-7e8af71931ce", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"3 <IntegerArray>\n", | |
"[3, 1, 2]\n", | |
"Length: 3, dtype: Int64\n", | |
"4 <IntegerArray>\n", | |
"[3, 2, 1]\n", | |
"Length: 3, dtype: Int64\n", | |
"5 <IntegerArray>\n", | |
"[2, 1, 3]\n", | |
"Length: 3, dtype: Int64\n", | |
"6 <IntegerArray>\n", | |
"[1, 3, 2]\n", | |
"Length: 3, dtype: Int64\n", | |
"7 <IntegerArray>\n", | |
"[1, 2, 3]\n", | |
"Length: 3, dtype: Int64\n", | |
"8 <IntegerArray>\n", | |
"[1, 2, 3]\n", | |
"Length: 3, dtype: Int64\n" | |
] | |
} | |
], | |
"source": [ | |
"df = fill_na(df, date_label, hue_label)\n", | |
"\n", | |
"for date, df_date in df.groupby(by=date_label):\n", | |
" print(date, df_date[hue_label].unique())" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"id": "40bbc7c7-730b-45ce-ad16-695781ce8a11", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": {}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"application/vnd.holoviews_exec.v0+json": "", | |
"text/html": [ | |
"<div id='p1148'>\n", | |
" <div id=\"e920b61c-4f08-4574-b80a-a7abb049b9b0\" data-root-id=\"p1148\" style=\"display: contents;\"></div>\n", | |
"</div>\n", | |
"<script type=\"application/javascript\">(function(root) {\n", | |
" var docs_json = {\"c7e769b9-dec6-4b35-aedb-4a0f0cfe8978\":{\"version\":\"3.3.0\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"Row\",\"id\":\"p1148\",\"attributes\":{\"name\":\"Row01131\",\"tags\":[\"embedded\"],\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1151\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/css/loading.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1281\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/css/listpanel.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1149\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/bundled/theme/default.css\"}},{\"type\":\"object\",\"name\":\"ImportedStyleSheet\",\"id\":\"p1150\",\"attributes\":{\"url\":\"https://cdn.holoviz.org/panel/1.3.1/dist/bundled/theme/native.css\"}}],\"min_width\":600,\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\",\"children\":[{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"p1152\",\"attributes\":{\"name\":\"HSpacer01142\",\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"id\":\"p1151\"},{\"id\":\"p1149\"},{\"id\":\"p1150\"}],\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}},{\"type\":\"object\",\"name\":\"Figure\",\"id\":\"p1159\",\"attributes\":{\"height\":300,\"margin\":[5,10],\"sizing_mode\":\"fixed\",\"align\":\"start\",\"x_range\":{\"type\":\"object\",\"name\":\"FactorRange\",\"id\":\"p1153\",\"attributes\":{\"tags\":[[[\"cyl\",\"cyl\",null],[\"origin\",\"origin\",null]],[]],\"factors\":[[\"3\",\"1\"],[\"3\",\"2\"],[\"3\",\"3\"],[\"4\",\"1\"],[\"4\",\"2\"],[\"4\",\"3\"],[\"5\",\"1\"],[\"5\",\"2\"],[\"5\",\"3\"],[\"6\",\"1\"],[\"6\",\"2\"],[\"6\",\"3\"],[\"7\",\"1\"],[\"7\",\"2\"],[\"7\",\"3\"],[\"8\",\"1\"],[\"8\",\"2\"],[\"8\",\"3\"]]}},\"y_range\":{\"type\":\"object\",\"name\":\"Range1d\",\"id\":\"p1154\",\"attributes\":{\"tags\":[[[\"mpg\",\"mpg\",null]],{\"type\":\"map\",\"entries\":[[\"invert_yaxis\",false],[\"autorange\",false]]}],\"start\":5.24,\"end\":50.36,\"reset_start\":5.24,\"reset_end\":50.36}},\"x_scale\":{\"type\":\"object\",\"name\":\"CategoricalScale\",\"id\":\"p1169\"},\"y_scale\":{\"type\":\"object\",\"name\":\"LinearScale\",\"id\":\"p1170\"},\"title\":{\"type\":\"object\",\"name\":\"Title\",\"id\":\"p1162\",\"attributes\":{\"text\":\"With filling\",\"text_color\":\"black\",\"text_font_size\":\"12pt\"}},\"renderers\":[{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1195\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1186\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1187\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1188\"},\"data\":{\"type\":\"map\",\"entries\":[[\"index\",[[\"8\",\"1\"],[\"8\",\"1\"],[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"6\",\"1\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"4\",\"2\"],[\"6\",\"3\"],[\"6\",\"2\"]]],[\"mpg\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAN0BmZmZmZuY3QJqZmZmZmTpAzczMzMxMR0DNzMzMzMw8QM3MzMzMzDpAAAAAAAAAQ0DNzMzMzIxFQAAAAAAAwERAZmZmZmYmRkAzMzMzM7NFQAAAAAAAAEZAmpmZmZlZQEAzMzMzM7M+QA==\"},\"shape\":[14],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1196\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1197\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1192\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1198\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"size\":{\"type\":\"value\",\"value\":4},\"angle\":{\"type\":\"value\",\"value\":0.0},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"},\"fill_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_color\":{\"type\":\"value\",\"value\":\"black\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_scale\":{\"type\":\"value\",\"value\":12.0},\"hatch_pattern\":{\"type\":\"value\",\"value\":null},\"hatch_weight\":{\"type\":\"value\",\"value\":1.0},\"radius\":{\"type\":\"value\",\"value\":null}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1193\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Circle\",\"id\":\"p1194\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"y\":{\"type\":\"field\",\"field\":\"mpg\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"value\",\"value\":\"black\"},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1208\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1199\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1200\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1201\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"],[\"3\",\"1\"],[\"3\",\"2\"],[\"5\",\"1\"],[\"5\",\"3\"],[\"8\",\"2\"],[\"8\",\"3\"],[\"7\",\"1\"],[\"7\",\"2\"],[\"7\",\"3\"]]],[\"y0\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"MzMzMzMzNEDNzMzMzExGQAAAAAAAADlAZmZmZmamQkAAAAAAAIBDQDMzMzMzszdAZmZmZmZmOUDNzMzMzGw0QDMzMzMzM0JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}],[\"x1\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"],[\"3\",\"1\"],[\"3\",\"2\"],[\"5\",\"1\"],[\"5\",\"3\"],[\"8\",\"2\"],[\"8\",\"3\"],[\"7\",\"1\"],[\"7\",\"2\"],[\"7\",\"3\"]]],[\"y1\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAMEAAAAAAAIBBQM3MzMzMzDRAAAAAAAAAPkBmZmZmZuY+QM3MzMzMDDZAmZmZmZkZOUDNzMzMzGw0QGZmZmZm5j5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1209\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1210\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1205\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1211\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1206\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1207\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1221\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1212\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1213\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1214\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"],[\"3\",\"1\"],[\"3\",\"2\"],[\"5\",\"1\"],[\"5\",\"3\"],[\"8\",\"2\"],[\"8\",\"3\"],[\"7\",\"1\"],[\"7\",\"2\"],[\"7\",\"3\"]]],[\"y0\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAIkAAAAAAAAA0QAAAAAAAAC5AAAAAAAAAMkAAAAAAAAAzQAAAAAAAADJAAAAAAAAAM0AzMzMzMzMwQM3MzMzMTDRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}],[\"x1\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"],[\"3\",\"1\"],[\"3\",\"2\"],[\"5\",\"1\"],[\"5\",\"3\"],[\"8\",\"2\"],[\"8\",\"3\"],[\"7\",\"1\"],[\"7\",\"2\"],[\"7\",\"3\"]]],[\"y1\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAKkAAAAAAAIA7QAAAAAAAADJAAAAAAAAAOEAAAAAAAAA5QAAAAAAAwDJAAAAAAACANEDNzMzMzGwwQJqZmZmZ2TZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1222\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1223\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1218\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1224\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1219\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1220\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1234\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1225\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1226\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1227\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\",-0.2],[\"4\",\"3\",-0.2],[\"6\",\"1\",-0.2],[\"4\",\"2\",-0.2],[\"4\",\"1\",-0.2],[\"3\",\"3\",-0.2],[\"6\",\"3\",-0.2],[\"6\",\"2\",-0.2],[\"5\",\"2\",-0.2],[\"3\",\"1\",-0.2],[\"3\",\"2\",-0.2],[\"5\",\"1\",-0.2],[\"5\",\"3\",-0.2],[\"8\",\"2\",-0.2],[\"8\",\"3\",-0.2],[\"7\",\"1\",-0.2],[\"7\",\"2\",-0.2],[\"7\",\"3\",-0.2]]],[\"y0\",[9.0,20.0,15.0,18.0,19.0,18.0,19.0,16.2,20.3,0,0,0,0,0,0,0,0,0]],[\"x1\",[[\"8\",\"1\",0.2],[\"4\",\"3\",0.2],[\"6\",\"1\",0.2],[\"4\",\"2\",0.2],[\"4\",\"1\",0.2],[\"3\",\"3\",0.2],[\"6\",\"3\",0.2],[\"6\",\"2\",0.2],[\"5\",\"2\",0.2],[\"3\",\"1\",0.2],[\"3\",\"2\",0.2],[\"5\",\"1\",0.2],[\"5\",\"3\",0.2],[\"8\",\"2\",0.2],[\"8\",\"3\",0.2],[\"7\",\"1\",0.2],[\"7\",\"2\",0.2],[\"7\",\"3\",0.2]]],[\"y1\",[9.0,20.0,15.0,18.0,19.0,18.0,19.0,16.2,20.3,0,0,0,0,0,0,0,0,0]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1235\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1236\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1231\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1237\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1232\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1233\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1247\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1238\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1239\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1240\"},\"data\":{\"type\":\"map\",\"entries\":[[\"x0\",[[\"8\",\"1\",-0.2],[\"4\",\"3\",-0.2],[\"6\",\"1\",-0.2],[\"4\",\"2\",-0.2],[\"4\",\"1\",-0.2],[\"3\",\"3\",-0.2],[\"6\",\"3\",-0.2],[\"6\",\"2\",-0.2],[\"5\",\"2\",-0.2],[\"3\",\"1\",-0.2],[\"3\",\"2\",-0.2],[\"5\",\"1\",-0.2],[\"5\",\"3\",-0.2],[\"8\",\"2\",-0.2],[\"8\",\"3\",-0.2],[\"7\",\"1\",-0.2],[\"7\",\"2\",-0.2],[\"7\",\"3\",-0.2]]],[\"y0\",[20.2,44.6,25.0,37.3,39.0,23.7,25.4,20.425,36.4,0,0,0,0,0,0,0,0,0]],[\"x1\",[[\"8\",\"1\",0.2],[\"4\",\"3\",0.2],[\"6\",\"1\",0.2],[\"4\",\"2\",0.2],[\"4\",\"1\",0.2],[\"3\",\"3\",0.2],[\"6\",\"3\",0.2],[\"6\",\"2\",0.2],[\"5\",\"2\",0.2],[\"3\",\"1\",0.2],[\"3\",\"2\",0.2],[\"5\",\"1\",0.2],[\"5\",\"3\",0.2],[\"8\",\"2\",0.2],[\"8\",\"3\",0.2],[\"7\",\"1\",0.2],[\"7\",\"2\",0.2],[\"7\",\"3\",0.2]]],[\"y1\",[20.2,44.6,25.0,37.3,39.0,23.7,25.4,20.425,36.4,0,0,0,0,0,0,0,0,0]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1248\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1249\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1244\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1250\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1245\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"Segment\",\"id\":\"p1246\",\"attributes\":{\"x0\":{\"type\":\"field\",\"field\":\"x0\"},\"y0\":{\"type\":\"field\",\"field\":\"y0\"},\"x1\":{\"type\":\"field\",\"field\":\"x1\"},\"y1\":{\"type\":\"field\",\"field\":\"y1\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1261\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1252\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1253\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1254\"},\"data\":{\"type\":\"map\",\"entries\":[[\"index\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"],[\"3\",\"1\"],[\"3\",\"2\"],[\"5\",\"1\"],[\"5\",\"3\"],[\"8\",\"2\"],[\"8\",\"3\"],[\"7\",\"1\"],[\"7\",\"2\"],[\"7\",\"3\"]]],[\"top\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAALEAAAAAAAABAQAAAAAAAADNAAAAAAAAAO0AzMzMzMzM7QAAAAAAAQDRAmpmZmZkZN0AAAAAAAMAwQGZmZmZmZjlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}],[\"bottom\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAMEAAAAAAAIBBQM3MzMzMzDRAAAAAAAAAPkBmZmZmZuY+QM3MzMzMDDZAmZmZmZkZOUDNzMzMzGw0QGZmZmZm5j5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}],[\"box_fill_color\",[\"1\",\"3\",\"1\",\"2\",\"1\",\"3\",\"3\",\"2\",\"2\",\"1\",\"2\",\"1\",\"3\",\"2\",\"3\",\"1\",\"2\",\"3\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1262\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1263\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1258\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"type\":\"object\",\"name\":\"CategoricalColorMapper\",\"id\":\"p1251\",\"attributes\":{\"palette\":[\"#e41a1c\",\"#377eb8\",\"#4daf4a\"],\"factors\":[\"1\",\"3\",\"2\"]}}}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1264\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1251\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_color\":{\"type\":\"value\",\"value\":\"black\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_scale\":{\"type\":\"value\",\"value\":12.0},\"hatch_pattern\":{\"type\":\"value\",\"value\":null},\"hatch_weight\":{\"type\":\"value\",\"value\":1.0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1259\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1251\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1260\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1251\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}},{\"type\":\"object\",\"name\":\"GlyphRenderer\",\"id\":\"p1274\",\"attributes\":{\"data_source\":{\"type\":\"object\",\"name\":\"ColumnDataSource\",\"id\":\"p1265\",\"attributes\":{\"selected\":{\"type\":\"object\",\"name\":\"Selection\",\"id\":\"p1266\",\"attributes\":{\"indices\":[],\"line_indices\":[]}},\"selection_policy\":{\"type\":\"object\",\"name\":\"UnionRenderers\",\"id\":\"p1267\"},\"data\":{\"type\":\"map\",\"entries\":[[\"index\",[[\"8\",\"1\"],[\"4\",\"3\"],[\"6\",\"1\"],[\"4\",\"2\"],[\"4\",\"1\"],[\"3\",\"3\"],[\"6\",\"3\"],[\"6\",\"2\"],[\"5\",\"2\"],[\"3\",\"1\"],[\"3\",\"2\"],[\"5\",\"1\"],[\"5\",\"3\"],[\"8\",\"2\"],[\"8\",\"3\"],[\"7\",\"1\"],[\"7\",\"2\"],[\"7\",\"3\"]]],[\"top\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAAKkAAAAAAAIA7QAAAAAAAADJAAAAAAAAAOEAAAAAAAAA5QAAAAAAAwDJAAAAAAACANEDNzMzMzGwwQJqZmZmZ2TZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}],[\"bottom\",{\"type\":\"ndarray\",\"array\":{\"type\":\"bytes\",\"data\":\"AAAAAAAALEAAAAAAAABAQAAAAAAAADNAAAAAAAAAO0AzMzMzMzM7QAAAAAAAQDRAmpmZmZkZN0AAAAAAAMAwQGZmZmZmZjlAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"},\"shape\":[18],\"dtype\":\"float64\",\"order\":\"little\"}],[\"box_fill_color\",[\"1\",\"3\",\"1\",\"2\",\"1\",\"3\",\"3\",\"2\",\"2\",\"1\",\"2\",\"1\",\"3\",\"2\",\"3\",\"1\",\"2\",\"3\"]]]}}},\"view\":{\"type\":\"object\",\"name\":\"CDSView\",\"id\":\"p1275\",\"attributes\":{\"filter\":{\"type\":\"object\",\"name\":\"AllIndices\",\"id\":\"p1276\"}}},\"glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1271\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1251\"}}}},\"selection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1277\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_color\":{\"type\":\"value\",\"value\":\"black\"},\"line_alpha\":{\"type\":\"value\",\"value\":1.0},\"line_width\":{\"type\":\"value\",\"value\":1},\"line_join\":{\"type\":\"value\",\"value\":\"bevel\"},\"line_cap\":{\"type\":\"value\",\"value\":\"butt\"},\"line_dash\":{\"type\":\"value\",\"value\":[]},\"line_dash_offset\":{\"type\":\"value\",\"value\":0},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1251\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_color\":{\"type\":\"value\",\"value\":\"black\"},\"hatch_alpha\":{\"type\":\"value\",\"value\":1.0},\"hatch_scale\":{\"type\":\"value\",\"value\":12.0},\"hatch_pattern\":{\"type\":\"value\",\"value\":null},\"hatch_weight\":{\"type\":\"value\",\"value\":1.0}}},\"nonselection_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1272\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.1},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1251\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.1},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.1}}},\"muted_glyph\":{\"type\":\"object\",\"name\":\"VBar\",\"id\":\"p1273\",\"attributes\":{\"x\":{\"type\":\"field\",\"field\":\"index\"},\"width\":{\"type\":\"value\",\"value\":0.7},\"bottom\":{\"type\":\"field\",\"field\":\"bottom\"},\"top\":{\"type\":\"field\",\"field\":\"top\"},\"line_alpha\":{\"type\":\"value\",\"value\":0.2},\"fill_color\":{\"type\":\"field\",\"field\":\"box_fill_color\",\"transform\":{\"id\":\"p1251\"}},\"fill_alpha\":{\"type\":\"value\",\"value\":0.2},\"hatch_alpha\":{\"type\":\"value\",\"value\":0.2}}}}}],\"toolbar\":{\"type\":\"object\",\"name\":\"Toolbar\",\"id\":\"p1168\",\"attributes\":{\"tools\":[{\"type\":\"object\",\"name\":\"WheelZoomTool\",\"id\":\"p1158\",\"attributes\":{\"tags\":[\"hv_created\"],\"renderers\":\"auto\",\"zoom_together\":\"none\"}},{\"type\":\"object\",\"name\":\"SaveTool\",\"id\":\"p1181\"},{\"type\":\"object\",\"name\":\"PanTool\",\"id\":\"p1182\"},{\"type\":\"object\",\"name\":\"BoxZoomTool\",\"id\":\"p1183\",\"attributes\":{\"overlay\":{\"type\":\"object\",\"name\":\"BoxAnnotation\",\"id\":\"p1184\",\"attributes\":{\"syncable\":false,\"level\":\"overlay\",\"visible\":false,\"left_units\":\"canvas\",\"right_units\":\"canvas\",\"top_units\":\"canvas\",\"bottom_units\":\"canvas\",\"line_color\":\"black\",\"line_alpha\":1.0,\"line_width\":2,\"line_dash\":[4,4],\"fill_color\":\"lightgrey\",\"fill_alpha\":0.5}}}},{\"type\":\"object\",\"name\":\"ResetTool\",\"id\":\"p1185\"}],\"active_drag\":{\"id\":\"p1182\"},\"active_scroll\":{\"id\":\"p1158\"}}},\"left\":[{\"type\":\"object\",\"name\":\"LinearAxis\",\"id\":\"p1176\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"BasicTicker\",\"id\":\"p1177\",\"attributes\":{\"mantissas\":[1,2,5]}},\"formatter\":{\"type\":\"object\",\"name\":\"BasicTickFormatter\",\"id\":\"p1178\"},\"axis_label\":\"mpg\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1179\"}}}],\"below\":[{\"type\":\"object\",\"name\":\"CategoricalAxis\",\"id\":\"p1171\",\"attributes\":{\"ticker\":{\"type\":\"object\",\"name\":\"CategoricalTicker\",\"id\":\"p1172\"},\"formatter\":{\"type\":\"object\",\"name\":\"CategoricalTickFormatter\",\"id\":\"p1173\"},\"axis_label\":\"cyl, origin\",\"major_label_policy\":{\"type\":\"object\",\"name\":\"AllLabels\",\"id\":\"p1174\"}}}],\"center\":[{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1175\",\"attributes\":{\"axis\":{\"id\":\"p1171\"},\"ticker\":{\"id\":\"p1172\"}}},{\"type\":\"object\",\"name\":\"Grid\",\"id\":\"p1180\",\"attributes\":{\"dimension\":1,\"axis\":{\"id\":\"p1176\"},\"ticker\":{\"id\":\"p1177\"}}}],\"min_border_top\":10,\"min_border_bottom\":10,\"min_border_left\":10,\"min_border_right\":10,\"output_backend\":\"webgl\"}},{\"type\":\"object\",\"name\":\"Spacer\",\"id\":\"p1279\",\"attributes\":{\"name\":\"HSpacer01145\",\"stylesheets\":[\"\\n:host(.pn-loading.pn-arc):before, .pn-loading.pn-arc:before {\\n background-image: url(\\\"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46IGF1dG87IGJhY2tncm91bmQ6IG5vbmU7IGRpc3BsYXk6IGJsb2NrOyBzaGFwZS1yZW5kZXJpbmc6IGF1dG87IiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiPiAgPGNpcmNsZSBjeD0iNTAiIGN5PSI1MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjYzNjM2MzIiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij4gICAgPGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJyb3RhdGUiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiBkdXI9IjFzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIj48L2FuaW1hdGVUcmFuc2Zvcm0+ICA8L2NpcmNsZT48L3N2Zz4=\\\");\\n background-size: auto calc(min(50%, 400px));\\n}\",{\"id\":\"p1151\"},{\"id\":\"p1149\"},{\"id\":\"p1150\"}],\"margin\":0,\"sizing_mode\":\"stretch_width\",\"align\":\"start\"}}]}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"toggle_value1\",\"properties\":[{\"name\":\"active_icons\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"options\",\"kind\":\"Any\",\"default\":{\"type\":\"map\",\"entries\":[[\"favorite\",\"heart\"]]}},{\"name\":\"value\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"_reactions\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"_base_url\",\"kind\":\"Any\",\"default\":\"https://tabler-icons.io/static/tabler-icons/icons/\"}]},{\"type\":\"model\",\"name\":\"copy_to_clipboard1\",\"properties\":[{\"name\":\"value\",\"kind\":\"Any\",\"default\":null},{\"name\":\"fill\",\"kind\":\"Any\",\"default\":\"none\"}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"BootstrapTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"MaterialTemplateActions1\",\"properties\":[{\"name\":\"open_modal\",\"kind\":\"Any\",\"default\":0},{\"name\":\"close_modal\",\"kind\":\"Any\",\"default\":0}]}]}};\n", | |
" var render_items = [{\"docid\":\"c7e769b9-dec6-4b35-aedb-4a0f0cfe8978\",\"roots\":{\"p1148\":\"e920b61c-4f08-4574-b80a-a7abb049b9b0\"},\"root_ids\":[\"p1148\"]}];\n", | |
" var docs = Object.values(docs_json)\n", | |
" if (!docs) {\n", | |
" return\n", | |
" }\n", | |
" const py_version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')\n", | |
" const is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1\n", | |
" function embed_document(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
" for (const render_item of render_items) {\n", | |
" for (const root_id of render_item.root_ids) {\n", | |
"\tconst id_el = document.getElementById(root_id)\n", | |
"\tif (id_el.children.length && (id_el.children[0].className === 'bk-root')) {\n", | |
"\t const root_el = id_el.children[0]\n", | |
"\t root_el.id = root_el.id + '-rendered'\n", | |
"\t}\n", | |
" }\n", | |
" }\n", | |
" }\n", | |
" function get_bokeh(root) {\n", | |
" if (root.Bokeh === undefined) {\n", | |
" return null\n", | |
" } else if (root.Bokeh.version !== py_version && !is_dev) {\n", | |
" if (root.Bokeh.versions === undefined || !root.Bokeh.versions.has(py_version)) {\n", | |
"\treturn null\n", | |
" }\n", | |
" return root.Bokeh.versions.get(py_version);\n", | |
" } else if (root.Bokeh.version === py_version) {\n", | |
" return root.Bokeh\n", | |
" }\n", | |
" return null\n", | |
" }\n", | |
" function is_loaded(root) {\n", | |
" var Bokeh = get_bokeh(root)\n", | |
" return (Bokeh != null && Bokeh.Panel !== undefined)\n", | |
" }\n", | |
" if (is_loaded(root)) {\n", | |
" embed_document(root);\n", | |
" } else {\n", | |
" var attempts = 0;\n", | |
" var timer = setInterval(function(root) {\n", | |
" if (is_loaded(root)) {\n", | |
" clearInterval(timer);\n", | |
" embed_document(root);\n", | |
" } else if (document.readyState == \"complete\") {\n", | |
" attempts++;\n", | |
" if (attempts > 200) {\n", | |
" clearInterval(timer);\n", | |
"\t var Bokeh = get_bokeh(root)\n", | |
"\t if (Bokeh == null || Bokeh.Panel == null) {\n", | |
" console.warn(\"Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing\");\n", | |
"\t } else {\n", | |
"\t console.warn(\"Panel: WARNING: Attempting to render but not all required libraries could be resolved.\")\n", | |
"\t embed_document(root)\n", | |
"\t }\n", | |
" }\n", | |
" }\n", | |
" }, 25, root)\n", | |
" }\n", | |
"})(window);</script>" | |
], | |
"text/plain": [ | |
":BoxWhisker [cyl,origin] (mpg)" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": { | |
"application/vnd.holoviews_exec.v0+json": { | |
"id": "p1148" | |
} | |
}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"plot(df=df, date_label=date_label, hue_label=hue_label, param_label=param_label, title=\"With filling\")" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"id": "cab7353c-8dca-4c40-b36e-3a9ca3f4f5ad", | |
"metadata": {}, | |
"source": [ | |
"See also:\n", | |
"\n", | |
"1. https://holoviews.org/gallery/demos/bokeh/boxplot_chart.html\n", | |
"2. https://holoviews.org/reference/elements/bokeh/BoxWhisker.html\n", | |
"3. Add line to holoviews plot https://discourse.holoviz.org/t/recreate-seaborn-boxplot-with-multiple-categories-with-holoview-of-bokeh/3224/2\n", | |
"4. https://docs.bokeh.org/en/dev-3.4/docs/examples/topics/stats/boxplot.html" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3 (ipykernel)", | |
"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.11.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment