(function(root) {
function now() {
return new Date();
}
var force = true;
if (typeof root._bokeh_onload_callbacks === "undefined" || force === true) {
root._bokeh_onload_callbacks = [];
root._bokeh_is_loading = undefined;
}
var JS_MIME_TYPE = 'application/javascript';
var HTML_MIME_TYPE = 'text/html';
var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';
var CLASS_NAME = 'output_bokeh rendered_html';
/**
* Render data to the DOM node
*/
function render(props, node) {
var script = document.createElement("script");
node.appendChild(script);
}
/**
* Handle when an output is cleared or removed
*/
function handleClearOutput(event, handle) {
var cell = handle.cell;
var id = cell.output_area._bokeh_element_id;
var server_id = cell.output_area._bokeh_server_id;
// Clean up Bokeh references
if (id != null && id in Bokeh.index) {
Bokeh.index[id].model.document.clear();
delete Bokeh.index[id];
}
if (server_id !== undefined) {
// Clean up Bokeh references
var cmd = "from bokeh.io.state import curstate; print(curstate().uuid_to_server['" + server_id + "'].get_sessions()[0].document.roots[0]._id)";
cell.notebook.kernel.execute(cmd, {
iopub: {
output: function(msg) {
var id = msg.content.text.trim();
if (id in Bokeh.index) {
Bokeh.index[id].model.document.clear();
delete Bokeh.index[id];
}
}
}
});
// Destroy server and session
var cmd = "import bokeh.io.notebook as ion; ion.destroy_server('" + server_id + "')";
cell.notebook.kernel.execute(cmd);
}
}
/**
* Handle when a new output is added
*/
function handleAddOutput(event, handle) {
var output_area = handle.output_area;
var output = handle.output;
// limit handleAddOutput to display_data with EXEC_MIME_TYPE content only
if ((output.output_type != "display_data") || (!Object.prototype.hasOwnProperty.call(output.data, EXEC_MIME_TYPE))) {
return
}
var toinsert = output_area.element.find("." + CLASS_NAME.split(' ')[0]);
if (output.metadata[EXEC_MIME_TYPE]["id"] !== undefined) {
toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];
// store reference to embed id on output_area
output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE]["id"];
}
if (output.metadata[EXEC_MIME_TYPE]["server_id"] !== undefined) {
var bk_div = document.createElement("div");
bk_div.innerHTML = output.data[HTML_MIME_TYPE];
var script_attrs = bk_div.children[0].attributes;
for (var i = 0; i < script_attrs.length; i++) {
toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);
toinsert[toinsert.length - 1].firstChild.textContent = bk_div.children[0].textContent
}
// store reference to server id on output_area
output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE]["server_id"];
}
}
function register_renderer(events, OutputArea) {
function append_mime(data, metadata, element) {
// create a DOM node to render to
var toinsert = this.create_output_subarea(
metadata,
CLASS_NAME,
EXEC_MIME_TYPE
);
this.keyboard_manager.register_events(toinsert);
// Render to node
var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};
render(props, toinsert[toinsert.length - 1]);
element.append(toinsert);
return toinsert
}
/* Handle when an output is cleared or removed */
events.on('clear_output.CodeCell', handleClearOutput);
events.on('delete.Cell', handleClearOutput);
/* Handle when a new output is added */
events.on('output_added.OutputArea', handleAddOutput);
/**
* Register the mime type and append_mime function with output_area
*/
OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {
/* Is output safe? */
safe: true,
/* Index of renderer in `output_area.display_order` */
index: 0
});
}
// register the mime type if in Jupyter Notebook environment and previously unregistered
if (root.Jupyter !== undefined) {
var events = require('base/js/events');
var OutputArea = require('notebook/js/outputarea').OutputArea;
if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {
register_renderer(events, OutputArea);
}
}
if (typeof (root._bokeh_timeout) === "undefined" || force === true) {
root._bokeh_timeout = Date.now() + 5000;
root._bokeh_failed_load = false;
}
var NB_LOAD_WARNING = {'data': {'text/html':
"<div style='background-color: #fdd'>\n"+
"<p>\n"+
"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \n"+
"may be due to a slow or bad network connection. Possible fixes:\n"+
"</p>\n"+
"<ul>\n"+
"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\n"+
"<li>use INLINE resources instead, as so:</li>\n"+
"</ul>\n"+
"<code>\n"+
"from bokeh.resources import INLINE\n"+
"output_notebook(resources=INLINE)\n"+
"</code>\n"+
"</div>"}};
function display_loaded() {
var el = document.getElementById(null);
if (el != null) {
el.textContent = "BokehJS is loading...";
}
if (root.Bokeh !== undefined) {
if (el != null) {
el.textContent = "BokehJS " + root.Bokeh.version + " successfully loaded.";
}
} else if (Date.now() < root._bokeh_timeout) {
setTimeout(display_loaded, 100)
}
}
function run_callbacks() {
try {
root._bokeh_onload_callbacks.forEach(function(callback) {
if (callback != null)
callback();
});
} finally {
delete root._bokeh_onload_callbacks
}
console.debug("Bokeh: all callbacks have finished");
}
function load_libs(css_urls, js_urls, callback) {
if (css_urls == null) css_urls = [];
if (js_urls == null) js_urls = [];
root._bokeh_onload_callbacks.push(callback);
if (root._bokeh_is_loading > 0) {
console.debug("Bokeh: BokehJS is being loaded, scheduling callback at", now());
return null;
}
if (js_urls == null || js_urls.length === 0) {
run_callbacks();
return null;
}
console.debug("Bokeh: BokehJS not loaded, scheduling load and callback at", now());
root._bokeh_is_loading = css_urls.length + js_urls.length;
function on_load() {
root._bokeh_is_loading--;
if (root._bokeh_is_loading === 0) {
console.debug("Bokeh: all BokehJS libraries/stylesheets loaded");
run_callbacks()
}
}
function on_error(url) {
console.error("failed to load " + url);
}
for (let i = 0; i < css_urls.length; i++) {
const url = css_urls[i];
const element = document.createElement("link");
element.onload = on_load;
element.onerror = on_error.bind(null, url);
element.rel = "stylesheet";
element.type = "text/css";
element.href = url;
console.debug("Bokeh: injecting link tag for BokehJS stylesheet: ", url);
document.body.appendChild(element);
}
const hashes = {"https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js": "XypntL49z55iwGVUW4qsEu83zKL3XEcz0MjuGOQ9SlaaQ68X/g+k1FcioZi7oQAc", "https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js": "bEsM86IHGDTLCS0Zod8a8WM6Y4+lafAL/eSiyQcuPzinmWNgNO2/olUF0Z2Dkn5i", "https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js": "TX0gSQTdXTTeScqxj6PVQxTiRW8DOoGVwinyi1D3kxv7wuxQ02XkOxv0xwiypcAH"};
for (let i = 0; i < js_urls.length; i++) {
const url = js_urls[i];
const element = document.createElement('script');
element.onload = on_load;
element.onerror = on_error.bind(null, url);
element.async = false;
element.src = url;
if (url in hashes) {
element.crossOrigin = "anonymous";
element.integrity = "sha384-" + hashes[url];
}
console.debug("Bokeh: injecting script tag for BokehJS library: ", url);
document.head.appendChild(element);
}
};
function inject_raw_css(css) {
const element = document.createElement("style");
element.appendChild(document.createTextNode(css));
document.body.appendChild(element);
}
var js_urls = ["https://cdn.bokeh.org/bokeh/release/bokeh-2.3.2.min.js", "https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.3.2.min.js", "https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.3.2.min.js"];
var css_urls = [];
var inline_js = [
function(Bokeh) {
Bokeh.set_log_level("info");
},
function(Bokeh) {
}
];
function run_inline_js() {
if (root.Bokeh !== undefined || force === true) {
for (var i = 0; i < inline_js.length; i++) {
inline_js[i].call(root, root.Bokeh);
}
} else if (Date.now() < root._bokeh_timeout) {
setTimeout(run_inline_js, 100);
} else if (!root._bokeh_failed_load) {
console.log("Bokeh: BokehJS failed to load within specified timeout.");
root._bokeh_failed_load = true;
} else if (force !== true) {
var cell = $(document.getElementById(null)).parents('.cell').data().cell;
cell.output_area.append_execute_result(NB_LOAD_WARNING)
}
}
if (root._bokeh_is_loading === 0) {
console.debug("Bokeh: BokehJS loaded, going straight to plotting");
run_inline_js();
} else {
load_libs(css_urls, js_urls, function() {
console.debug("Bokeh: BokehJS plotting callback run at", now());
run_inline_js();
});
}
}(window)); null
(function(root) {
function embed_document(root) {
var docs_json = {"17c885b5-f25b-486c-a3f5-b3408a8c26b4":{"defs":[],"roots":{"references":[{"attributes":{"below":[{"id":"1048"}],"center":[{"id":"1051"},{"id":"1055"}],"left":[{"id":"1052"}],"renderers":[{"id":"1073"},{"id":"1179"},{"id":"1305"},{"id":"1338"}],"title":{"id":"1038"},"toolbar":{"id":"1063"},"x_range":{"id":"1040"},"x_scale":{"id":"1044"},"y_range":{"id":"1042"},"y_scale":{"id":"1046"}},"id":"1037","subtype":"Figure","type":"Plot"},{"attributes":{"axis_label":"wt","formatter":{"id":"1081"},"major_label_policy":{"id":"1079"},"ticker":{"id":"1049"}},"id":"1048","type":"LinearAxis"},{"attributes":{"overlay":{"id":"1062"}},"id":"1058","type":"BoxZoomTool"},{"attributes":{"fill_color":{"value":"#1f77b4"},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1177","type":"Circle"},{"attributes":{},"id":"1191","type":"Selection"},{"attributes":{},"id":"1042","type":"DataRange1d"},{"attributes":{},"id":"1056","type":"PanTool"},{"attributes":{},"id":"1078","type":"BasicTickFormatter"},{"attributes":{},"id":"1320","type":"UnionRenderers"},{"attributes":{"data":{"x":{"__ndarray__":"9ihcj8L1BEAAAAAAAAAHQI/C9ShcjwJAuB6F61G4CUCF61G4HoULQK5H4XoUrgtAj8L1KFyPDECF61G4HoUJQDMzMzMzMwlAhetRuB6FC0CF61G4HoULQEjhehSuRxBA16NwPQrXDUA9CtejcD0OQAAAAAAAABVAGARWDi2yFUDhehSuR2EVQJqZmZmZmQFA16NwPQrX+T9cj8L1KFz9P7gehetRuANAKVyPwvUoDEB7FK5H4XoLQLgehetRuA5Aw/UoXI/CDkD2KFyPwvX+Px+F61G4HgFAaZHtfD81+D9cj8L1KFwJQClcj8L1KAZAj8L1KFyPDEA9CtejcD0GQA==","dtype":"float64","order":"little","shape":[32]},"y":{"__ndarray__":"AAAAAAAANUAAAAAAAAA1QM3MzMzMzDZAZmZmZmZmNUAzMzMzM7MyQJqZmZmZGTJAmpmZmZmZLEBmZmZmZmY4QM3MzMzMzDZAMzMzMzMzM0DNzMzMzMwxQGZmZmZmZjBAzczMzMxMMUBmZmZmZmYuQM3MzMzMzCRAzczMzMzMJEBmZmZmZmYtQDMzMzMzM0BAZmZmZmZmPkAzMzMzM/NAQAAAAAAAgDVAAAAAAAAAL0BmZmZmZmYuQJqZmZmZmSpAMzMzMzMzM0DNzMzMzEw7QAAAAAAAADpAZmZmZmZmPkCamZmZmZkvQDMzMzMzszNAAAAAAAAALkBmZmZmZmY1QA==","dtype":"float64","order":"little","shape":[32]}},"selected":{"id":"1319"},"selection_policy":{"id":"1320"}},"id":"1302","type":"ColumnDataSource"},{"attributes":{},"id":"1076","type":"AllLabels"},{"attributes":{},"id":"1049","type":"BasicTicker"},{"attributes":{"data_source":{"id":"1335"},"glyph":{"id":"1336"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1337"},"view":{"id":"1339"}},"id":"1338","type":"GlyphRenderer"},{"attributes":{"data":{"x":{"__ndarray__":"9ihcj8L1BEAAAAAAAAAHQI/C9ShcjwJAuB6F61G4CUCF61G4HoULQK5H4XoUrgtAj8L1KFyPDECF61G4HoUJQDMzMzMzMwlAhetRuB6FC0CF61G4HoULQEjhehSuRxBA16NwPQrXDUA9CtejcD0OQAAAAAAAABVAGARWDi2yFUDhehSuR2EVQJqZmZmZmQFA16NwPQrX+T9cj8L1KFz9P7gehetRuANAKVyPwvUoDEB7FK5H4XoLQLgehetRuA5Aw/UoXI/CDkD2KFyPwvX+Px+F61G4HgFAaZHtfD81+D9cj8L1KFwJQClcj8L1KAZAj8L1KFyPDEA9CtejcD0GQA==","dtype":"float64","order":"little","shape":[32]},"y":{"__ndarray__":"AAAAAAAANUAAAAAAAAA1QM3MzMzMzDZAZmZmZmZmNUAzMzMzM7MyQJqZmZmZGTJAmpmZmZmZLEBmZmZmZmY4QM3MzMzMzDZAMzMzMzMzM0DNzMzMzMwxQGZmZmZmZjBAzczMzMxMMUBmZmZmZmYuQM3MzMzMzCRAzczMzMzMJEBmZmZmZmYtQDMzMzMzM0BAZmZmZmZmPkAzMzMzM/NAQAAAAAAAgDVAAAAAAAAAL0BmZmZmZmYuQJqZmZmZmSpAMzMzMzMzM0DNzMzMzEw7QAAAAAAAADpAZmZmZmZmPkCamZmZmZkvQDMzMzMzszNAAAAAAAAALkBmZmZmZmY1QA==","dtype":"float64","order":"little","shape":[32]}},"selected":{"id":"1083"},"selection_policy":{"id":"1084"}},"id":"1070","type":"ColumnDataSource"},{"attributes":{"data":{"x":{"__ndarray__":"9ihcj8L1BEAAAAAAAAAHQI/C9ShcjwJAuB6F61G4CUCF61G4HoULQK5H4XoUrgtAj8L1KFyPDECF61G4HoUJQDMzMzMzMwlAhetRuB6FC0CF61G4HoULQEjhehSuRxBA16NwPQrXDUA9CtejcD0OQAAAAAAAABVAGARWDi2yFUDhehSuR2EVQJqZmZmZmQFA16NwPQrX+T9cj8L1KFz9P7gehetRuANAKVyPwvUoDEB7FK5H4XoLQLgehetRuA5Aw/UoXI/CDkD2KFyPwvX+Px+F61G4HgFAaZHtfD81+D9cj8L1KFwJQClcj8L1KAZAj8L1KFyPDEA9CtejcD0GQA==","dtype":"float64","order":"little","shape":[32]},"y":{"__ndarray__":"AAAAAAAANUAAAAAAAAA1QM3MzMzMzDZAZmZmZmZmNUAzMzMzM7MyQJqZmZmZGTJAmpmZmZmZLEBmZmZmZmY4QM3MzMzMzDZAMzMzMzMzM0DNzMzMzMwxQGZmZmZmZjBAzczMzMxMMUBmZmZmZmYuQM3MzMzMzCRAzczMzMzMJEBmZmZmZmYtQDMzMzMzM0BAZmZmZmZmPkAzMzMzM/NAQAAAAAAAgDVAAAAAAAAAL0BmZmZmZmYuQJqZmZmZmSpAMzMzMzMzM0DNzMzMzEw7QAAAAAAAADpAZmZmZmZmPkCamZmZmZkvQDMzMzMzszNAAAAAAAAALkBmZmZmZmY1QA==","dtype":"float64","order":"little","shape":[32]}},"selected":{"id":"1191"},"selection_policy":{"id":"1192"}},"id":"1176","type":"ColumnDataSource"},{"attributes":{},"id":"1060","type":"ResetTool"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1304","type":"Circle"},{"attributes":{},"id":"1046","type":"LinearScale"},{"attributes":{"fill_color":{"value":"#1f77b4"},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1071","type":"Circle"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1178","type":"Circle"},{"attributes":{"bottom_units":"screen","fill_alpha":0.5,"fill_color":"lightgrey","left_units":"screen","level":"overlay","line_alpha":1.0,"line_color":"black","line_dash":[4,4],"line_width":2,"right_units":"screen","syncable":false,"top_units":"screen"},"id":"1062","type":"BoxAnnotation"},{"attributes":{},"id":"1040","type":"DataRange1d"},{"attributes":{"source":{"id":"1070"}},"id":"1074","type":"CDSView"},{"attributes":{"source":{"id":"1176"}},"id":"1180","type":"CDSView"},{"attributes":{},"id":"1355","type":"UnionRenderers"},{"attributes":{"axis":{"id":"1052"},"dimension":1,"ticker":null},"id":"1055","type":"Grid"},{"attributes":{},"id":"1084","type":"UnionRenderers"},{"attributes":{"source":{"id":"1302"}},"id":"1306","type":"CDSView"},{"attributes":{"axis":{"id":"1048"},"ticker":null},"id":"1051","type":"Grid"},{"attributes":{},"id":"1083","type":"Selection"},{"attributes":{"data_source":{"id":"1176"},"glyph":{"id":"1177"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1178"},"view":{"id":"1180"}},"id":"1179","type":"GlyphRenderer"},{"attributes":{},"id":"1057","type":"WheelZoomTool"},{"attributes":{},"id":"1081","type":"BasicTickFormatter"},{"attributes":{},"id":"1079","type":"AllLabels"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1072","type":"Circle"},{"attributes":{"data_source":{"id":"1302"},"glyph":{"id":"1303"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1304"},"view":{"id":"1306"}},"id":"1305","type":"GlyphRenderer"},{"attributes":{"data":{"x":{"__ndarray__":"9ihcj8L1BEAAAAAAAAAHQI/C9ShcjwJAuB6F61G4CUCF61G4HoULQK5H4XoUrgtAj8L1KFyPDECF61G4HoUJQDMzMzMzMwlAhetRuB6FC0CF61G4HoULQEjhehSuRxBA16NwPQrXDUA9CtejcD0OQAAAAAAAABVAGARWDi2yFUDhehSuR2EVQJqZmZmZmQFA16NwPQrX+T9cj8L1KFz9P7gehetRuANAKVyPwvUoDEB7FK5H4XoLQLgehetRuA5Aw/UoXI/CDkD2KFyPwvX+Px+F61G4HgFAaZHtfD81+D9cj8L1KFwJQClcj8L1KAZAj8L1KFyPDEA9CtejcD0GQA==","dtype":"float64","order":"little","shape":[32]},"y":{"__ndarray__":"AAAAAAAANUAAAAAAAAA1QM3MzMzMzDZAZmZmZmZmNUAzMzMzM7MyQJqZmZmZGTJAmpmZmZmZLEBmZmZmZmY4QM3MzMzMzDZAMzMzMzMzM0DNzMzMzMwxQGZmZmZmZjBAzczMzMxMMUBmZmZmZmYuQM3MzMzMzCRAzczMzMzMJEBmZmZmZmYtQDMzMzMzM0BAZmZmZmZmPkAzMzMzM/NAQAAAAAAAgDVAAAAAAAAAL0BmZmZmZmYuQJqZmZmZmSpAMzMzMzMzM0DNzMzMzEw7QAAAAAAAADpAZmZmZmZmPkCamZmZmZkvQDMzMzMzszNAAAAAAAAALkBmZmZmZmY1QA==","dtype":"float64","order":"little","shape":[32]}},"selected":{"id":"1354"},"selection_policy":{"id":"1355"}},"id":"1335","type":"ColumnDataSource"},{"attributes":{"fill_color":{"value":"#1f77b4"},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1336","type":"Circle"},{"attributes":{"active_multi":null,"tools":[{"id":"1056"},{"id":"1057"},{"id":"1058"},{"id":"1059"},{"id":"1060"},{"id":"1061"}]},"id":"1063","type":"Toolbar"},{"attributes":{"axis_label":"mpg","formatter":{"id":"1078"},"major_label_policy":{"id":"1076"},"ticker":{"id":"1053"}},"id":"1052","type":"LinearAxis"},{"attributes":{},"id":"1044","type":"LinearScale"},{"attributes":{"data_source":{"id":"1070"},"glyph":{"id":"1071"},"hover_glyph":null,"muted_glyph":null,"nonselection_glyph":{"id":"1072"},"view":{"id":"1074"}},"id":"1073","type":"GlyphRenderer"},{"attributes":{},"id":"1319","type":"Selection"},{"attributes":{"text":"Simple line example"},"id":"1038","type":"Title"},{"attributes":{"source":{"id":"1335"}},"id":"1339","type":"CDSView"},{"attributes":{},"id":"1192","type":"UnionRenderers"},{"attributes":{},"id":"1354","type":"Selection"},{"attributes":{},"id":"1061","type":"HelpTool"},{"attributes":{},"id":"1059","type":"SaveTool"},{"attributes":{},"id":"1053","type":"BasicTicker"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#1f77b4"},"line_alpha":{"value":0.1},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1337","type":"Circle"},{"attributes":{"fill_color":{"value":"#1f77b4"},"line_color":{"value":"#1f77b4"},"x":{"field":"x"},"y":{"field":"y"}},"id":"1303","type":"Circle"}],"root_ids":["1037"]},"title":"Bokeh Application","version":"2.3.2"}};
var render_items = [{"docid":"17c885b5-f25b-486c-a3f5-b3408a8c26b4","root_ids":["1037"],"roots":{"1037":"7333eb14-400c-42b8-b80a-7414b2d2197f"}}];
root.Bokeh.embed.embed_items_notebook(docs_json, render_items);
}
if (root.Bokeh !== undefined) {
embed_document(root);
} else {
var attempts = 0;
var timer = setInterval(function(root) {
if (root.Bokeh !== undefined) {
clearInterval(timer);
embed_document(root);
} else {
attempts++;
if (attempts > 100) {
clearInterval(timer);
console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing");
}
}
}, 10, root)
}
})(window);