Data Applications with Panel

Objectives

  1. Discuss use cases of interactive vs static visualizations
  2. Illustrate use of interactive, reactive, and parametrized functions
  3. Extend knowledge to new dataset, including a ML model

Panel

Panel can be used to make a first pass at an app or dashboard in minutes, while also allowing you to fully customize the app's behavior and appearance or flexibly integrate GUI support into long-term, large-scale software projects. To make all these different ways of using Panel possible, four different APIs are available:

Interact functions: Auto-generates a full UI (including widgets) given a function

Reactive functions: Linking functions or methods to widgets using the pn.depends decorator, declaring that the function should be re-run when those widget values change

Parameterized class: Declare parameters and their ranges in Parameterized classes, then get GUIs (and value checking!) for free

Callbacks: Generate a UI by manually declaring callbacks that update panels or panes

import hvplot.pandas
import param
import panel as pn
import pandas as pd

import matplotlib.pyplot as plt
import seaborn as sns
# import plotly.plotly as py
%matplotlib inline

from bokeh.sampledata.autompg import autompg
from bokeh.sampledata.iris import flowers
<style>div.bk-hbox { display: flex; justify-content: center; }

div.bk-hbox div.bk-plot { padding: 8px; }

div.bk-hbox div.bk-data-table { padding: 20px; }

div.hololayout { display: flex; align-items: center; margin: 0; }

div.holoframe { width: 75%; }

div.holowell { display: flex; align-items: center; }

form.holoform { background-color: #fafafa; border-radius: 5px; overflow: hidden; padding-left: 0.8em; padding-right: 0.8em; padding-top: 0.4em; padding-bottom: 0.4em; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); margin-bottom: 20px; border: 1px solid #e3e3e3; }

div.holowidgets { padding-right: 0; width: 25%; }

div.holoslider { min-height: 0 !important; height: 0.8em; width: 100%; }

div.holoformgroup { padding-top: 0.5em; margin-bottom: 0.5em; }

div.hologroup { padding-left: 0; padding-right: 0.8em; width: 100%; }

.holoselect { width: 92%; margin-left: 0; margin-right: 0; }

.holotext { padding-left: 0.5em; padding-right: 0; width: 100%; }

.holowidgets .ui-resizable-se { visibility: hidden }

.holoframe > .ui-resizable-se { visibility: hidden }

.holowidgets .ui-resizable-s { visibility: hidden }

/* CSS rules for noUISlider based slider used by JupyterLab extension */

.noUi-handle { width: 20px !important; height: 20px !important; left: -5px !important; top: -5px !important; }

.noUi-handle:before, .noUi-handle:after { visibility: hidden; height: 0px; }

.noUi-target { margin-left: 0.5em; margin-right: 0.5em; } </style>

def autompg_plot(x='mpg', y='hp', color='#058805'):
    return autompg.hvplot.scatter(x, y, c=color, padding=0.1)

columns = list(autompg.columns[:-2])
autompg_plot()
<script type="application/javascript">(function(root) { function embed_document(root) {

var docs_json = {"d695ae87-d357-4bf6-8842-f6955b291d15":{"roots":{"references":[{"attributes":{"below":[{"id":"1013","type":"LinearAxis"}],"center":[{"id":"1017","type":"Grid"},{"id":"1022","type":"Grid"}],"left":[{"id":"1018","type":"LinearAxis"}],"margin":null,"min_border_bottom":10,"min_border_left":10,"min_border_right":10,"min_border_top":10,"plot_height":300,"plot_width":700,"renderers":[{"id":"1041","type":"GlyphRenderer"}],"sizing_mode":"fixed","title":{"id":"1005","type":"Title"},"toolbar":{"id":"1028","type":"Toolbar"},"x_range":{"id":"1001","type":"Range1d"},"x_scale":{"id":"1009","type":"LinearScale"},"y_range":{"id":"1002","type":"Range1d"},"y_scale":{"id":"1011","type":"LinearScale"}},"id":"1004","subtype":"Figure","type":"Plot"},{"attributes":{"overlay":{"id":"1052","type":"BoxAnnotation"}},"id":"1026","type":"BoxZoomTool"},{"attributes":{},"id":"1009","type":"LinearScale"},{"attributes":{},"id":"1011","type":"LinearScale"},{"attributes":{},"id":"1025","type":"WheelZoomTool"},{"attributes":{"callback":null,"data":{"hp":[130,165,150,150,140,198,220,215,225,190,170,160,150,225,95,95,97,85,88,46,87,90,95,113,90,215,200,210,193,88,90,95,100,105,100,88,100,165,175,153,150,180,170,175,110,72,100,88,86,90,70,76,65,69,60,70,95,80,54,90,86,165,175,150,153,150,208,155,160,190,97,150,130,140,150,112,76,87,69,86,92,97,80,88,175,150,145,137,150,198,150,158,150,215,225,175,105,100,100,88,95,46,150,167,170,180,100,88,72,94,90,85,107,90,145,230,49,75,91,112,150,110,122,180,95,100,100,67,80,65,75,100,110,105,140,150,150,140,150,83,67,78,52,61,75,75,75,97,93,67,95,105,72,72,170,145,150,148,110,105,110,95,110,110,129,75,83,100,78,96,71,97,97,70,90,95,88,98,115,53,86,81,92,79,83,140,150,120,152,100,105,81,90,52,60,70,53,100,78,110,95,71,70,75,72,102,150,88,108,120,180,145,130,150,68,80,58,96,70,145,110,145,130,110,105,100,98,180,170,190,149,78,88,75,89,63,83,67,78,97,110,110,48,66,52,70,60,110,140,139,105,95,85,88,100,90,105,85,110,120,145,165,139,140,68,95,97,75,95,105,85,97,103,125,115,133,71,68,115,85,88,90,110,130,129,138,135,155,142,125,150,71,65,80,80,77,125,71,90,70,70,65,69,90,115,115,90,76,60,70,65,90,88,90,90,78,90,75,92,75,65,105,65,48,48,67,67,67,67,62,132,100,88,72,84,84,92,110,84,58,64,60,67,65,62,68,63,65,65,74,75,75,100,74,80,76,116,120,110,105,88,85,88,88,88,85,84,90,92,74,68,68,63,70,88,75,70,67,67,67,110,85,92,112,96,84,90,86,52,84,79,82],"mpg":{"ndarray":"AAAAAAAAMkAAAAAAAAAuQAAAAAAAADJAAAAAAAAAMEAAAAAAAAAxQAAAAAAAAC5AAAAAAAAALEAAAAAAAAAsQAAAAAAAACxAAAAAAAAALkAAAAAAAAAuQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADhAAAAAAAAANkAAAAAAAAAyQAAAAAAAADVAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADlAAAAAAAAAOEAAAAAAAAA5QAAAAAAAADpAAAAAAAAANUAAAAAAAAAkQAAAAAAAACRAAAAAAAAAJkAAAAAAAAAiQAAAAAAAADtAAAAAAAAAPEAAAAAAAAA5QAAAAAAAADNAAAAAAAAAMEAAAAAAAAAxQAAAAAAAADNAAAAAAAAAMkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAAsQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAADJAAAAAAAAANkAAAAAAAAAzQAAAAAAAADJAAAAAAAAAN0AAAAAAAAA8QAAAAAAAAD5AAAAAAAAAPkAAAAAAAAA/QAAAAAAAgEFAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADhAAAAAAAAAOUAAAAAAAAA3QAAAAAAAADRAAAAAAAAANUAAAAAAAAAqQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADFAAAAAAAAAJkAAAAAAAAAqQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAzQAAAAAAAAC5AAAAAAAAAKkAAAAAAAAAqQAAAAAAAACxAAAAAAAAAMkAAAAAAAAA2QAAAAAAAADVAAAAAAAAAOkAAAAAAAAA2QAAAAAAAADxAAAAAAAAAN0AAAAAAAAA8QAAAAAAAADtAAAAAAAAAKkAAAAAAAAAsQAAAAAAAACpAAAAAAAAALEAAAAAAAAAuQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAACxAAAAAAAAAKkAAAAAAAAAoQAAAAAAAACpAAAAAAAAAMkAAAAAAAAAwQAAAAAAAADJAAAAAAAAAMkAAAAAAAAA3QAAAAAAAADpAAAAAAAAAJkAAAAAAAAAoQAAAAAAAACpAAAAAAAAAKEAAAAAAAAAyQAAAAAAAADRAAAAAAAAANUAAAAAAAAA2QAAAAAAAADJAAAAAAAAAM0AAAAAAAAA1QAAAAAAAADpAAAAAAAAALkAAAAAAAAAwQAAAAAAAAD1AAAAAAAAAOEAAAAAAAAA0QAAAAAAAADNAAAAAAAAALkAAAAAAAAA4QAAAAAAAADRAAAAAAAAAJkAAAAAAAAA0QAAAAAAAADNAAAAAAAAALkAAAAAAAAA/QAAAAAAAADpAAAAAAAAAQEAAAAAAAAA5QAAAAAAAADBAAAAAAAAAMEAAAAAAAAAyQAAAAAAAADBAAAAAAAAAKkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAA9QAAAAAAAADpAAAAAAAAAOkAAAAAAAAA/QAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA4QAAAAAAAADpAAAAAAAAAOEAAAAAAAAA6QAAAAAAAAD9AAAAAAAAAM0AAAAAAAAAyQAAAAAAAAC5AAAAAAAAALkAAAAAAAAAwQAAAAAAAAC5AAAAAAAAAMEAAAAAAAAAsQAAAAAAAADFAAAAAAAAAMEAAAAAAAAAuQAAAAAAAADJAAAAAAAAANUAAAAAAAAA0QAAAAAAAACpAAAAAAAAAPUAAAAAAAAA3QAAAAAAAADRAAAAAAAAAN0AAAAAAAAA4QAAAAAAAADlAAAAAAAAAOEAAAAAAAAAyQAAAAAAAAD1AAAAAAAAAM0AAAAAAAAA3QAAAAAAAADdAAAAAAAAANkAAAAAAAAA5QAAAAAAAgEBAAAAAAAAAPEAAAAAAAAA5QAAAAAAAADlAAAAAAAAAOkAAAAAAAAA7QAAAAAAAgDFAAAAAAAAAMEAAAAAAAAAvQAAAAAAAAC1AAAAAAAAANkAAAAAAAAA2QAAAAAAAADhAAAAAAACANkAAAAAAAAA9QAAAAAAAgDhAAAAAAAAAPUAAAAAAAIBAQAAAAAAAADRAAAAAAAAAMkAAAAAAAIAyQAAAAAAAgDFAAAAAAACAPUAAAAAAAABAQAAAAAAAADxAAAAAAACAOkAAAAAAAAA0QAAAAAAAACpAAAAAAAAAM0AAAAAAAAAzQAAAAAAAgDBAAAAAAACAMEAAAAAAAAAqQAAAAAAAACpAAAAAAAAAKkAAAAAAAIA/QAAAAAAAAD5AAAAAAAAAQkAAAAAAAIA5QAAAAAAAwEBAAAAAAACAMUAAAAAAAAAxQAAAAAAAAC9AAAAAAAAALkAAAAAAAIAxQAAAAAAAgDRAAAAAAAAAM0AAAAAAAIAyQAAAAAAAADBAAAAAAAAAL0AAAAAAAAAvQAAAAAAAADBAAAAAAAAAPUAAAAAAAIA4QAAAAAAAADpAAAAAAACAOUAAAAAAAIA+QAAAAAAAwEBAAAAAAAAAPkAAAAAAAIA+QAAAAAAAADZAAAAAAACANUAAAAAAAIA1QM3MzMzMjEVAzczMzMwMQkBmZmZmZmZAQDMzMzMzs0NAzczMzMwMQkBmZmZmZuYzQGZmZmZmZjNAMzMzMzMzNEAzMzMzMzMzQAAAAAAAgDRAMzMzMzMzNECamZmZmRk5QAAAAAAAgDRAZmZmZmZmM0CamZmZmZk0QM3MzMzMzDRAmpmZmZmZMkCamZmZmRkyQDMzMzMzMzNAMzMzMzOzMUCamZmZmRkyQAAAAAAAgDFAAAAAAAAAPkAAAAAAAIA7QDMzMzMzMztAZmZmZmbmPkCamZmZmRk1QDMzMzMzMzdAzczMzMzMN0BmZmZmZuY3QM3MzMzMTDRAAAAAAAAAMUCamZmZmZk1QDMzMzMzMzBAAAAAAACAP0AAAAAAAIA9QAAAAAAAgDVAzczMzMzMM0DNzMzMzEw2QDMzMzMzMzRAmpmZmZmZNEAAAAAAAAAxQJqZmZmZmTFAAAAAAACAMEAzMzMzMzMyQGZmZmZm5jBAAAAAAAAAL0AzMzMzMzMzQAAAAAAAgDJAZmZmZmbmP0DNzMzMzAxBQJqZmZmZ2UFAZmZmZmZmO0BmZmZmZmY5QAAAAAAAADdAMzMzMzMzO0BmZmZmZuY3QJqZmZmZGUFAAAAAAABAQUDNzMzMzMw/QGZmZmZmpkJAZmZmZmZmPEDNzMzMzMw8QM3MzMzMzDpAAAAAAADAQEAAAAAAAMBEQM3MzMzMDENAzczMzMwMQECamZmZmZlCQAAAAAAAADxAZmZmZmZmOkDNzMzMzEw4QJqZmZmZGTNAZmZmZmYmQUDNzMzMzMw9QM3MzMzMTD9AAAAAAACAQkCamZmZmRlAQM3MzMzMTEdAZmZmZmbmO0BmZmZmZmZEQGZmZmZmJkZAMzMzMzOzRUAzMzMzMzNCQAAAAAAAAD5AzczMzMxMRkBmZmZmZuZAQM3MzMzMzD1AmpmZmZlZQEAzMzMzM7M3QAAAAAAAgEFAMzMzMzMzQEAzMzMzMzM7QJqZmZmZmTpAzczMzMzMOUAAAAAAAIA3QAAAAAAAAD5AzczMzMyMQ0AAAAAAAIBDQM3MzMzMjEFAZmZmZmYmQEAAAAAAAIBCQJqZmZmZ2UJAzczMzMwMQUCamZmZmVlBQDMzMzMzM0FAZmZmZmbmPUAAAAAAAIBAQJqZmZmZ2UBAMzMzMzMzQEAzMzMzM3NAQJqZmZmZmT9AmpmZmZkZPEAzMzMzM7M+QGZmZmZmZjlAMzMzMzMzOEBmZmZmZmY2QJqZmZmZmTpAMzMzMzMzNECamZmZmZkxQAAAAAAAADxAAAAAAAAAO0AAAAAAAABBQAAAAAAAAD9AAAAAAAAAPUAAAAAAAAA7QAAAAAAAADhAAAAAAAAAQkAAAAAAAIBCQAAAAAAAAD9AAAAAAAAAQ0AAAAAAAABCQAAAAAAAAEJAAAAAAAAAQkAAAAAAAABBQAAAAAAAAENAAAAAAAAAQEAAAAAAAABDQAAAAAAAADlAAAAAAAAAQ0AAAAAAAAA6QAAAAAAAADZAAAAAAAAAQEAAAAAAAABCQAAAAAAAADtAAAAAAAAAO0AAAAAAAABGQAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA/QA==","dtype":"float64","shape":[392]}},"selected":{"id":"1036","type":"Selection"},"selection_policy":{"id":"1054","type":"UnionRenderers"}},"id":"1035","type":"ColumnDataSource"},{"attributes":{},"id":"1043","type":"BasicTickFormatter"},{"attributes":{},"id":"1045","type":"BasicTickFormatter"},{"attributes":{"text":"","text_color":{"value":"black"},"text_font_size":{"value":"12pt"}},"id":"1005","type":"Title"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#058805"},"line_alpha":{"value":0.1},"line_color":{"value":"#058805"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1039","type":"Scatter"},{"attributes":{"fill_color":{"value":"#058805"},"line_color":{"value":"#058805"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1038","type":"Scatter"},{"attributes":{"data_source":{"id":"1035","type":"ColumnDataSource"},"glyph":{"id":"1038","type":"Scatter"},"hover_glyph":null,"muted_glyph":{"id":"1040","type":"Scatter"},"nonselection_glyph":{"id":"1039","type":"Scatter"},"selection_glyph":null,"view":{"id":"1042","type":"CDSView"}},"id":"1041","type":"GlyphRenderer"},{"attributes":{},"id":"1024","type":"PanTool"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"#058805"},"line_alpha":{"value":0.2},"line_color":{"value":"#058805"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1040","type":"Scatter"},{"attributes":{"source":{"id":"1035","type":"ColumnDataSource"}},"id":"1042","type":"CDSView"},{"attributes":{},"id":"1036","type":"Selection"},{"attributes":{"dimension":1,"grid_line_color":null,"ticker":{"id":"1019","type":"BasicTicker"}},"id":"1022","type":"Grid"},{"attributes":{},"id":"1027","type":"ResetTool"},{"attributes":{},"id":"1023","type":"SaveTool"},{"attributes":{"axis_label":"hp","bounds":"auto","formatter":{"id":"1045","type":"BasicTickFormatter"},"major_label_orientation":"horizontal","ticker":{"id":"1019","type":"BasicTicker"}},"id":"1018","type":"LinearAxis"},{"attributes":{"callback":null,"renderers":[{"id":"1041","type":"GlyphRenderer"}],"tags":["hv_created"],"tooltips":[["mpg","@{mpg}"],["hp","@{hp}"]]},"id":"1003","type":"HoverTool"},{"attributes":{"callback":null,"end":48.21142857142857,"reset_end":48.21142857142857,"reset_start":7.388571428571429,"start":7.388571428571429,"tags":[[["mpg","mpg",null]]]},"id":"1001","type":"Range1d"},{"attributes":{"callback":null,"end":248.4,"reset_end":248.4,"reset_start":27.599999999999998,"start":27.599999999999998,"tags":[[["hp","hp",null]]]},"id":"1002","type":"Range1d"},{"attributes":{"axis_label":"mpg","bounds":"auto","formatter":{"id":"1043","type":"BasicTickFormatter"},"major_label_orientation":"horizontal","ticker":{"id":"1014","type":"BasicTicker"}},"id":"1013","type":"LinearAxis"},{"attributes":{},"id":"1014","type":"BasicTicker"},{"attributes":{"grid_line_color":null,"ticker":{"id":"1014","type":"BasicTicker"}},"id":"1017","type":"Grid"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"1052","type":"BoxAnnotation"},{"attributes":{},"id":"1054","type":"UnionRenderers"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"1003","type":"HoverTool"},{"id":"1023","type":"SaveTool"},{"id":"1024","type":"PanTool"},{"id":"1025","type":"WheelZoomTool"},{"id":"1026","type":"BoxZoomTool"},{"id":"1027","type":"ResetTool"}]},"id":"1028","type":"Toolbar"},{"attributes":{},"id":"1019","type":"BasicTicker"}],"root_ids":["1004"]},"title":"Bokeh Application","version":"1.2.0"}}; var render_items = [{"docid":"d695ae87-d357-4bf6-8842-f6955b291d15","roots":{"1004":"77f5f643-8028-45f3-be1f-6c2753943810"}}]; 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) { embed_document(root); clearInterval(timer); } attempts++; if (attempts > 100) { console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing"); clearInterval(timer); } }, 10, root) } })(window);</script>

Interact Function

The interact function will automatically generate a UI (including widgets) by inspecting the arguments of the function given to it or using additional hints you provide in the interact function call. If you have worked with the ipywidgets package you may already be familiar with this approach (in fact the implementation is modeled on that reference implementation). The basic idea is that given a function that returns some object, Panel will inspect the arguments to that function, try to infer appropriate widgets for those arguments, and then re-run that function to update the output whenever one of the widgets generates an event. For more detail on how interact creates widgets and other ways of using it, see the Panel interact user guide. This section instead focuses on when and why to use this API, laying out its benefits and drawbacks.

The main benefit of this approach is convenience and ease of use. You start by writing some function that returns an object, be that a plot, a dataframe, or anything else that Panel can render. Then with a single call to pn.interact(), you can immediately get an interactive UI. Unlike ipywidgets, the pn.interact call will return a Panel, which can then be further modified by laying out the widgets and output separately or combining these components with other panes if you wish. Thus even though pn.interact itself is limited in flexibility, you can unpack and reconfigure the results from it to generate fairly complex GUIs in very little code.

Pros:

  • Easy to use
  • Doesn't typically require modifying existing visualization code

Cons:

  • Most of the behavior is implicit, with magic happening by introspection, making it difficult to see how to modify the appearance or functionality of the resulting object
  • Layouts can be customized, but requires indexing into the panel returned by interact
pn.extension()

color = pn.widgets.ColorPicker(name='Color', value='#4f4fdf')
layout = pn.interact(autompg_plot, x=columns, y=columns, color=color)

pn.Row(pn.Column('## MPG Explorer', layout[0]), layout[1])
<script type="application/javascript"> function msg_handler(msg) { var metadata = msg.metadata; var buffers = msg.buffers; var msg = msg.content.data; if ((metadata.msg_type == "Ready")) { if (metadata.content) { console.log("Python callback returned following output:", metadata.content); } } else if (metadata.msg_type == "Error") { console.log("Python failed with the following traceback:", metadata.traceback) } else {

var plot_id = "1111"; if (plot_id in window.PyViz.plot_index) { var plot = window.PyViz.plot_index[plot_id]; } else { var plot = Bokeh.index[plot_id]; }

if (plot_id in window.PyViz.receivers) { var receiver = window.PyViz.receivers[plot_id]; } else if (Bokeh.protocol === undefined) { return; } else { var receiver = new Bokeh.protocol.Receiver(); window.PyViz.receivers[plot_id] = receiver; }

if ((buffers != undefined) && (buffers.length > 0)) { receiver.consume(buffers[0].buffer) } else { receiver.consume(msg) }

const comm_msg = receiver.message; if ((comm_msg != null) && (Object.keys(comm_msg.content).length > 0)) { plot.model.document.apply_json_patch(comm_msg.content, comm_msg.buffers) }

  }
}
if ((window.PyViz == undefined) || (!window.PyViz.comm_manager)) {
  console.log("Could not find comm manager")
} else {
  window.PyViz.comm_manager.register_target('1111', '65fa337b204f4b378273d85c9b639470', msg_handler);
}

(function(root) { function embed_document(root) {

var docs_json = {"65ae11ac-ba00-4ae7-8ff0-0ae00d2bfec3":{"roots":{"references":[{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1155","type":"CustomJS"},{"attributes":{},"id":"1207","type":"Selection"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1122","type":"CustomJS"},{"attributes":{"below":[{"id":"1184","type":"LinearAxis"}],"center":[{"id":"1188","type":"Grid"},{"id":"1193","type":"Grid"}],"left":[{"id":"1189","type":"LinearAxis"}],"margin":null,"min_border_bottom":10,"min_border_left":10,"min_border_right":10,"min_border_top":10,"plot_height":300,"plot_width":700,"renderers":[{"id":"1212","type":"GlyphRenderer"}],"sizing_mode":"fixed","title":{"id":"1176","type":"Title"},"toolbar":{"id":"1199","type":"Toolbar"},"x_range":{"id":"1172","type":"Range1d"},"x_scale":{"id":"1180","type":"LinearScale"},"y_range":{"id":"1173","type":"Range1d"},"y_scale":{"id":"1182","type":"LinearScale"}},"id":"1175","subtype":"Figure","type":"Plot"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1156","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1123","type":"CustomJS"},{"attributes":{"text":"","text_color":{"value":"black"},"text_font_size":{"value":"12pt"}},"id":"1176","type":"Title"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1157","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1124","type":"CustomJS"},{"attributes":{},"id":"1180","type":"LinearScale"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1158","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1125","type":"CustomJS"},{"attributes":{},"id":"1182","type":"LinearScale"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1159","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1126","type":"CustomJS"},{"attributes":{"axis_label":"mpg","bounds":"auto","formatter":{"id":"1214","type":"BasicTickFormatter"},"major_label_orientation":"horizontal","ticker":{"id":"1185","type":"BasicTicker"}},"id":"1184","type":"LinearAxis"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1160","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1127","type":"CustomJS"},{"attributes":{},"id":"1185","type":"BasicTicker"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1161","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'title') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['title'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {title: cb_obj['title'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1128","type":"CustomJS"},{"attributes":{"grid_line_color":null,"ticker":{"id":"1185","type":"BasicTicker"}},"id":"1188","type":"Grid"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1162","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'options') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['options'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {options: cb_obj['options'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1129","type":"CustomJS"},{"attributes":{"axis_label":"hp","bounds":"auto","formatter":{"id":"1216","type":"BasicTickFormatter"},"major_label_orientation":"horizontal","ticker":{"id":"1190","type":"BasicTicker"}},"id":"1189","type":"LinearAxis"},{"attributes":{"margin":[5,5,5,5],"name":"Markdown01449","text":"

MPG Explorer

"},"id":"1113","type":"Div"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1163","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'sizing_mode') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['sizing_mode'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {sizing_mode: cb_obj['sizing_mode'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1130","type":"CustomJS"},{"attributes":{},"id":"1190","type":"BasicTicker"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1164","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'value') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['value'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {value: cb_obj['value'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1131","type":"CustomJS"},{"attributes":{"dimension":1,"grid_line_color":null,"ticker":{"id":"1190","type":"BasicTicker"}},"id":"1193","type":"Grid"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1165","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1132","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'title') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['title'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {title: cb_obj['title'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1166","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1133","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'sizing_mode') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['sizing_mode'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {sizing_mode: cb_obj['sizing_mode'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1167","type":"CustomJS"},{"attributes":{"fill_color":{"value":"#4f4fdf"},"line_color":{"value":"#4f4fdf"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1209","type":"Scatter"},{"attributes":{},"id":"1194","type":"SaveTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'color') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['color'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {color: cb_obj['color'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1168","type":"CustomJS"},{"attributes":{},"id":"1195","type":"PanTool"},{"attributes":{"callback":null,"color":"#4f4fdf","js_property_callbacks":{"change:align":[{"id":"1154","type":"CustomJS"}],"change:aspect_ratio":[{"id":"1155","type":"CustomJS"}],"change:background":[{"id":"1156","type":"CustomJS"}],"change:color":[{"id":"1168","type":"CustomJS"}],"change:css_classes":[{"id":"1157","type":"CustomJS"}],"change:disabled":[{"id":"1158","type":"CustomJS"}],"change:height":[{"id":"1159","type":"CustomJS"}],"change:height_policy":[{"id":"1160","type":"CustomJS"}],"change:margin":[{"id":"1161","type":"CustomJS"}],"change:max_height":[{"id":"1162","type":"CustomJS"}],"change:max_width":[{"id":"1163","type":"CustomJS"}],"change:min_height":[{"id":"1164","type":"CustomJS"}],"change:min_width":[{"id":"1165","type":"CustomJS"}],"change:sizing_mode":[{"id":"1167","type":"CustomJS"}],"change:title":[{"id":"1166","type":"CustomJS"}],"change:width":[{"id":"1169","type":"CustomJS"}],"change:width_policy":[{"id":"1170","type":"CustomJS"}]},"margin":[5,10,5,10],"title":"Color"},"id":"1153","type":"ColorPicker"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1169","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1135","type":"CustomJS"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"1223","type":"BoxAnnotation"},{"attributes":{},"id":"1196","type":"WheelZoomTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1170","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1136","type":"CustomJS"},{"attributes":{"overlay":{"id":"1223","type":"BoxAnnotation"}},"id":"1197","type":"BoxZoomTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1137","type":"CustomJS"},{"attributes":{},"id":"1198","type":"ResetTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1138","type":"CustomJS"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"1174","type":"HoverTool"},{"id":"1194","type":"SaveTool"},{"id":"1195","type":"PanTool"},{"id":"1196","type":"WheelZoomTool"},{"id":"1197","type":"BoxZoomTool"},{"id":"1198","type":"ResetTool"}]},"id":"1199","type":"Toolbar"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1139","type":"CustomJS"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#4f4fdf"},"line_alpha":{"value":0.1},"line_color":{"value":"#4f4fdf"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1210","type":"Scatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1140","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1141","type":"CustomJS"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"#4f4fdf"},"line_alpha":{"value":0.2},"line_color":{"value":"#4f4fdf"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1211","type":"Scatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1142","type":"CustomJS"},{"attributes":{"data_source":{"id":"1206","type":"ColumnDataSource"},"glyph":{"id":"1209","type":"Scatter"},"hover_glyph":null,"muted_glyph":{"id":"1211","type":"Scatter"},"nonselection_glyph":{"id":"1210","type":"Scatter"},"selection_glyph":null,"view":{"id":"1213","type":"CDSView"}},"id":"1212","type":"GlyphRenderer"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1143","type":"CustomJS"},{"attributes":{"source":{"id":"1206","type":"ColumnDataSource"}},"id":"1213","type":"CDSView"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1144","type":"CustomJS"},{"attributes":{"callback":null,"js_property_callbacks":{"change:align":[{"id":"1116","type":"CustomJS"}],"change:aspect_ratio":[{"id":"1117","type":"CustomJS"}],"change:background":[{"id":"1118","type":"CustomJS"}],"change:css_classes":[{"id":"1119","type":"CustomJS"}],"change:disabled":[{"id":"1120","type":"CustomJS"}],"change:height":[{"id":"1121","type":"CustomJS"}],"change:height_policy":[{"id":"1122","type":"CustomJS"}],"change:margin":[{"id":"1123","type":"CustomJS"}],"change:max_height":[{"id":"1124","type":"CustomJS"}],"change:max_width":[{"id":"1125","type":"CustomJS"}],"change:min_height":[{"id":"1126","type":"CustomJS"}],"change:min_width":[{"id":"1127","type":"CustomJS"}],"change:options":[{"id":"1129","type":"CustomJS"}],"change:sizing_mode":[{"id":"1130","type":"CustomJS"}],"change:title":[{"id":"1128","type":"CustomJS"}],"change:value":[{"id":"1131","type":"CustomJS"}],"change:width":[{"id":"1132","type":"CustomJS"}],"change:width_policy":[{"id":"1133","type":"CustomJS"}]},"margin":[5,10,5,10],"options":["mpg","cyl","displ","hp","weight","accel","yr"],"title":"x","value":"mpg"},"id":"1115","type":"Select"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1145","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1146","type":"CustomJS"},{"attributes":{"callback":null,"end":48.21142857142857,"reset_end":48.21142857142857,"reset_start":7.388571428571429,"start":7.388571428571429,"tags":[[["mpg","mpg",null]]]},"id":"1172","type":"Range1d"},{"attributes":{"children":[{"id":"1113","type":"Div"},{"id":"1114","type":"Column"}],"margin":[0,0,0,0],"name":"Column01451"},"id":"1112","type":"Column"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'title') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['title'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {title: cb_obj['title'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1147","type":"CustomJS"},{"attributes":{"callback":null,"data":{"hp":[130,165,150,150,140,198,220,215,225,190,170,160,150,225,95,95,97,85,88,46,87,90,95,113,90,215,200,210,193,88,90,95,100,105,100,88,100,165,175,153,150,180,170,175,110,72,100,88,86,90,70,76,65,69,60,70,95,80,54,90,86,165,175,150,153,150,208,155,160,190,97,150,130,140,150,112,76,87,69,86,92,97,80,88,175,150,145,137,150,198,150,158,150,215,225,175,105,100,100,88,95,46,150,167,170,180,100,88,72,94,90,85,107,90,145,230,49,75,91,112,150,110,122,180,95,100,100,67,80,65,75,100,110,105,140,150,150,140,150,83,67,78,52,61,75,75,75,97,93,67,95,105,72,72,170,145,150,148,110,105,110,95,110,110,129,75,83,100,78,96,71,97,97,70,90,95,88,98,115,53,86,81,92,79,83,140,150,120,152,100,105,81,90,52,60,70,53,100,78,110,95,71,70,75,72,102,150,88,108,120,180,145,130,150,68,80,58,96,70,145,110,145,130,110,105,100,98,180,170,190,149,78,88,75,89,63,83,67,78,97,110,110,48,66,52,70,60,110,140,139,105,95,85,88,100,90,105,85,110,120,145,165,139,140,68,95,97,75,95,105,85,97,103,125,115,133,71,68,115,85,88,90,110,130,129,138,135,155,142,125,150,71,65,80,80,77,125,71,90,70,70,65,69,90,115,115,90,76,60,70,65,90,88,90,90,78,90,75,92,75,65,105,65,48,48,67,67,67,67,62,132,100,88,72,84,84,92,110,84,58,64,60,67,65,62,68,63,65,65,74,75,75,100,74,80,76,116,120,110,105,88,85,88,88,88,85,84,90,92,74,68,68,63,70,88,75,70,67,67,67,110,85,92,112,96,84,90,86,52,84,79,82],"mpg":{"ndarray":"AAAAAAAAMkAAAAAAAAAuQAAAAAAAADJAAAAAAAAAMEAAAAAAAAAxQAAAAAAAAC5AAAAAAAAALEAAAAAAAAAsQAAAAAAAACxAAAAAAAAALkAAAAAAAAAuQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADhAAAAAAAAANkAAAAAAAAAyQAAAAAAAADVAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADlAAAAAAAAAOEAAAAAAAAA5QAAAAAAAADpAAAAAAAAANUAAAAAAAAAkQAAAAAAAACRAAAAAAAAAJkAAAAAAAAAiQAAAAAAAADtAAAAAAAAAPEAAAAAAAAA5QAAAAAAAADNAAAAAAAAAMEAAAAAAAAAxQAAAAAAAADNAAAAAAAAAMkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAAsQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAADJAAAAAAAAANkAAAAAAAAAzQAAAAAAAADJAAAAAAAAAN0AAAAAAAAA8QAAAAAAAAD5AAAAAAAAAPkAAAAAAAAA/QAAAAAAAgEFAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADhAAAAAAAAAOUAAAAAAAAA3QAAAAAAAADRAAAAAAAAANUAAAAAAAAAqQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADFAAAAAAAAAJkAAAAAAAAAqQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAzQAAAAAAAAC5AAAAAAAAAKkAAAAAAAAAqQAAAAAAAACxAAAAAAAAAMkAAAAAAAAA2QAAAAAAAADVAAAAAAAAAOkAAAAAAAAA2QAAAAAAAADxAAAAAAAAAN0AAAAAAAAA8QAAAAAAAADtAAAAAAAAAKkAAAAAAAAAsQAAAAAAAACpAAAAAAAAALEAAAAAAAAAuQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAACxAAAAAAAAAKkAAAAAAAAAoQAAAAAAAACpAAAAAAAAAMkAAAAAAAAAwQAAAAAAAADJAAAAAAAAAMkAAAAAAAAA3QAAAAAAAADpAAAAAAAAAJkAAAAAAAAAoQAAAAAAAACpAAAAAAAAAKEAAAAAAAAAyQAAAAAAAADRAAAAAAAAANUAAAAAAAAA2QAAAAAAAADJAAAAAAAAAM0AAAAAAAAA1QAAAAAAAADpAAAAAAAAALkAAAAAAAAAwQAAAAAAAAD1AAAAAAAAAOEAAAAAAAAA0QAAAAAAAADNAAAAAAAAALkAAAAAAAAA4QAAAAAAAADRAAAAAAAAAJkAAAAAAAAA0QAAAAAAAADNAAAAAAAAALkAAAAAAAAA/QAAAAAAAADpAAAAAAAAAQEAAAAAAAAA5QAAAAAAAADBAAAAAAAAAMEAAAAAAAAAyQAAAAAAAADBAAAAAAAAAKkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAA9QAAAAAAAADpAAAAAAAAAOkAAAAAAAAA/QAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA4QAAAAAAAADpAAAAAAAAAOEAAAAAAAAA6QAAAAAAAAD9AAAAAAAAAM0AAAAAAAAAyQAAAAAAAAC5AAAAAAAAALkAAAAAAAAAwQAAAAAAAAC5AAAAAAAAAMEAAAAAAAAAsQAAAAAAAADFAAAAAAAAAMEAAAAAAAAAuQAAAAAAAADJAAAAAAAAANUAAAAAAAAA0QAAAAAAAACpAAAAAAAAAPUAAAAAAAAA3QAAAAAAAADRAAAAAAAAAN0AAAAAAAAA4QAAAAAAAADlAAAAAAAAAOEAAAAAAAAAyQAAAAAAAAD1AAAAAAAAAM0AAAAAAAAA3QAAAAAAAADdAAAAAAAAANkAAAAAAAAA5QAAAAAAAgEBAAAAAAAAAPEAAAAAAAAA5QAAAAAAAADlAAAAAAAAAOkAAAAAAAAA7QAAAAAAAgDFAAAAAAAAAMEAAAAAAAAAvQAAAAAAAAC1AAAAAAAAANkAAAAAAAAA2QAAAAAAAADhAAAAAAACANkAAAAAAAAA9QAAAAAAAgDhAAAAAAAAAPUAAAAAAAIBAQAAAAAAAADRAAAAAAAAAMkAAAAAAAIAyQAAAAAAAgDFAAAAAAACAPUAAAAAAAABAQAAAAAAAADxAAAAAAACAOkAAAAAAAAA0QAAAAAAAACpAAAAAAAAAM0AAAAAAAAAzQAAAAAAAgDBAAAAAAACAMEAAAAAAAAAqQAAAAAAAACpAAAAAAAAAKkAAAAAAAIA/QAAAAAAAAD5AAAAAAAAAQkAAAAAAAIA5QAAAAAAAwEBAAAAAAACAMUAAAAAAAAAxQAAAAAAAAC9AAAAAAAAALkAAAAAAAIAxQAAAAAAAgDRAAAAAAAAAM0AAAAAAAIAyQAAAAAAAADBAAAAAAAAAL0AAAAAAAAAvQAAAAAAAADBAAAAAAAAAPUAAAAAAAIA4QAAAAAAAADpAAAAAAACAOUAAAAAAAIA+QAAAAAAAwEBAAAAAAAAAPkAAAAAAAIA+QAAAAAAAADZAAAAAAACANUAAAAAAAIA1QM3MzMzMjEVAzczMzMwMQkBmZmZmZmZAQDMzMzMzs0NAzczMzMwMQkBmZmZmZuYzQGZmZmZmZjNAMzMzMzMzNEAzMzMzMzMzQAAAAAAAgDRAMzMzMzMzNECamZmZmRk5QAAAAAAAgDRAZmZmZmZmM0CamZmZmZk0QM3MzMzMzDRAmpmZmZmZMkCamZmZmRkyQDMzMzMzMzNAMzMzMzOzMUCamZmZmRkyQAAAAAAAgDFAAAAAAAAAPkAAAAAAAIA7QDMzMzMzMztAZmZmZmbmPkCamZmZmRk1QDMzMzMzMzdAzczMzMzMN0BmZmZmZuY3QM3MzMzMTDRAAAAAAAAAMUCamZmZmZk1QDMzMzMzMzBAAAAAAACAP0AAAAAAAIA9QAAAAAAAgDVAzczMzMzMM0DNzMzMzEw2QDMzMzMzMzRAmpmZmZmZNEAAAAAAAAAxQJqZmZmZmTFAAAAAAACAMEAzMzMzMzMyQGZmZmZm5jBAAAAAAAAAL0AzMzMzMzMzQAAAAAAAgDJAZmZmZmbmP0DNzMzMzAxBQJqZmZmZ2UFAZmZmZmZmO0BmZmZmZmY5QAAAAAAAADdAMzMzMzMzO0BmZmZmZuY3QJqZmZmZGUFAAAAAAABAQUDNzMzMzMw/QGZmZmZmpkJAZmZmZmZmPEDNzMzMzMw8QM3MzMzMzDpAAAAAAADAQEAAAAAAAMBEQM3MzMzMDENAzczMzMwMQECamZmZmZlCQAAAAAAAADxAZmZmZmZmOkDNzMzMzEw4QJqZmZmZGTNAZmZmZmYmQUDNzMzMzMw9QM3MzMzMTD9AAAAAAACAQkCamZmZmRlAQM3MzMzMTEdAZmZmZmbmO0BmZmZmZmZEQGZmZmZmJkZAMzMzMzOzRUAzMzMzMzNCQAAAAAAAAD5AzczMzMxMRkBmZmZmZuZAQM3MzMzMzD1AmpmZmZlZQEAzMzMzM7M3QAAAAAAAgEFAMzMzMzMzQEAzMzMzMzM7QJqZmZmZmTpAzczMzMzMOUAAAAAAAIA3QAAAAAAAAD5AzczMzMyMQ0AAAAAAAIBDQM3MzMzMjEFAZmZmZmYmQEAAAAAAAIBCQJqZmZmZ2UJAzczMzMwMQUCamZmZmVlBQDMzMzMzM0FAZmZmZmbmPUAAAAAAAIBAQJqZmZmZ2UBAMzMzMzMzQEAzMzMzM3NAQJqZmZmZmT9AmpmZmZkZPEAzMzMzM7M+QGZmZmZmZjlAMzMzMzMzOEBmZmZmZmY2QJqZmZmZmTpAMzMzMzMzNECamZmZmZkxQAAAAAAAADxAAAAAAAAAO0AAAAAAAABBQAAAAAAAAD9AAAAAAAAAPUAAAAAAAAA7QAAAAAAAADhAAAAAAAAAQkAAAAAAAIBCQAAAAAAAAD9AAAAAAAAAQ0AAAAAAAABCQAAAAAAAAEJAAAAAAAAAQkAAAAAAAABBQAAAAAAAAENAAAAAAAAAQEAAAAAAAABDQAAAAAAAADlAAAAAAAAAQ0AAAAAAAAA6QAAAAAAAADZAAAAAAAAAQEAAAAAAAABCQAAAAAAAADtAAAAAAAAAO0AAAAAAAABGQAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA/QA==","dtype":"float64","shape":[392]}},"selected":{"id":"1207","type":"Selection"},"selection_policy":{"id":"1225","type":"UnionRenderers"}},"id":"1206","type":"ColumnDataSource"},{"attributes":{"children":[{"id":"1115","type":"Select"},{"id":"1134","type":"Select"},{"id":"1153","type":"ColorPicker"}],"margin":[0,0,0,0],"name":"Column01448"},"id":"1114","type":"Column"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'options') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['options'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {options: cb_obj['options'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1148","type":"CustomJS"},{"attributes":{},"id":"1214","type":"BasicTickFormatter"},{"attributes":{"callback":null,"end":248.4,"reset_end":248.4,"reset_start":27.599999999999998,"start":27.599999999999998,"tags":[[["hp","hp",null]]]},"id":"1173","type":"Range1d"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'sizing_mode') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['sizing_mode'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {sizing_mode: cb_obj['sizing_mode'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1149","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'value') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['value'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {value: cb_obj['value'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1150","type":"CustomJS"},{"attributes":{"callback":null,"renderers":[{"id":"1212","type":"GlyphRenderer"}],"tags":["hv_created"],"tooltips":[["mpg","@{mpg}"],["hp","@{hp}"]]},"id":"1174","type":"HoverTool"},{"attributes":{"callback":null,"js_property_callbacks":{"change:align":[{"id":"1135","type":"CustomJS"}],"change:aspect_ratio":[{"id":"1136","type":"CustomJS"}],"change:background":[{"id":"1137","type":"CustomJS"}],"change:css_classes":[{"id":"1138","type":"CustomJS"}],"change:disabled":[{"id":"1139","type":"CustomJS"}],"change:height":[{"id":"1140","type":"CustomJS"}],"change:height_policy":[{"id":"1141","type":"CustomJS"}],"change:margin":[{"id":"1142","type":"CustomJS"}],"change:max_height":[{"id":"1143","type":"CustomJS"}],"change:max_width":[{"id":"1144","type":"CustomJS"}],"change:min_height":[{"id":"1145","type":"CustomJS"}],"change:min_width":[{"id":"1146","type":"CustomJS"}],"change:options":[{"id":"1148","type":"CustomJS"}],"change:sizing_mode":[{"id":"1149","type":"CustomJS"}],"change:title":[{"id":"1147","type":"CustomJS"}],"change:value":[{"id":"1150","type":"CustomJS"}],"change:width":[{"id":"1151","type":"CustomJS"}],"change:width_policy":[{"id":"1152","type":"CustomJS"}]},"margin":[5,10,5,10],"options":["mpg","cyl","displ","hp","weight","accel","yr"],"title":"y","value":"hp"},"id":"1134","type":"Select"},{"attributes":{"children":[{"id":"1112","type":"Column"},{"id":"1171","type":"Row"}],"margin":[0,0,0,0],"name":"Row01452"},"id":"1111","type":"Row"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1151","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1116","type":"CustomJS"},{"attributes":{},"id":"1225","type":"UnionRenderers"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "58fc5a01dc6e4985862e90e54d13b05f", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["58fc5a01dc6e4985862e90e54d13b05f"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "58fc5a01dc6e4985862e90e54d13b05f";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1152","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1117","type":"CustomJS"},{"attributes":{},"id":"1216","type":"BasicTickFormatter"},{"attributes":{"children":[{"id":"1175","subtype":"Figure","type":"Plot"}],"margin":[0,0,0,0],"name":"Row01447"},"id":"1171","type":"Row"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1118","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1119","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1120","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "0a8edaf0af164c5bb005e31db5f15179", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["0a8edaf0af164c5bb005e31db5f15179"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "0a8edaf0af164c5bb005e31db5f15179";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1154","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1111'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1111", "cffb6acec30047d5842a9a745866c238", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["cffb6acec30047d5842a9a745866c238"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "cffb6acec30047d5842a9a745866c238";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1121","type":"CustomJS"}],"root_ids":["1111"]},"title":"Bokeh Application","version":"1.2.0"}}; var render_items = [{"docid":"65ae11ac-ba00-4ae7-8ff0-0ae00d2bfec3","roots":{"1111":"ec3d9532-6cb1-43c8-b74d-5934fb1b29c3"}}]; 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) { embed_document(root); clearInterval(timer); } attempts++; if (attempts > 100) { console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing"); clearInterval(timer); } }, 10, root) } })(window);</script>

Reactive Functions

The reactive programming API is very similar to the interact function but makes it possible to explicitly declare the inputs to the function using the depends decorator and also makes the layout of the different components more explicit. The pn.depends decorator is a powerful way to declare the parameters a function depends on. By decorating a function with pn.depends, we declare that when those parameters change the function should be called with the new values of those parameters. This approach makes it very explicit which parameters the function depends on and ties it directly to the objects that control it. Once a function has been annotated in this way, it can be laid out alongside the widgets.

Pros:

  • Very clear mapping from the inputs to the arguments of the function
  • Very explicit layout of each of the different components

Cons:

  • Mixes the definition of the function with the GUI elements it depends on
x = pn.widgets.Select(value='mpg', options=columns, name='x')
y = pn.widgets.Select(value='hp', options=columns, name='y')
color = pn.widgets.ColorPicker(name='Color', value='#AA0505')

@pn.depends(x.param.value, y.param.value, color.param.value)
def autompg_plot(x, y, color):
    return autompg.hvplot.scatter(x, y, c=color)

pn.Row(
    pn.Column('## MPG Explorer', x, y, color),
    autompg_plot)
<script type="application/javascript"> function msg_handler(msg) { var metadata = msg.metadata; var buffers = msg.buffers; var msg = msg.content.data; if ((metadata.msg_type == "Ready")) { if (metadata.content) { console.log("Python callback returned following output:", metadata.content); } } else if (metadata.msg_type == "Error") { console.log("Python failed with the following traceback:", metadata.traceback) } else {

var plot_id = "1266"; if (plot_id in window.PyViz.plot_index) { var plot = window.PyViz.plot_index[plot_id]; } else { var plot = Bokeh.index[plot_id]; }

if (plot_id in window.PyViz.receivers) { var receiver = window.PyViz.receivers[plot_id]; } else if (Bokeh.protocol === undefined) { return; } else { var receiver = new Bokeh.protocol.Receiver(); window.PyViz.receivers[plot_id] = receiver; }

if ((buffers != undefined) && (buffers.length > 0)) { receiver.consume(buffers[0].buffer) } else { receiver.consume(msg) }

const comm_msg = receiver.message; if ((comm_msg != null) && (Object.keys(comm_msg.content).length > 0)) { plot.model.document.apply_json_patch(comm_msg.content, comm_msg.buffers) }

  }
}
if ((window.PyViz == undefined) || (!window.PyViz.comm_manager)) {
  console.log("Could not find comm manager")
} else {
  window.PyViz.comm_manager.register_target('1266', '299e4b7acfb7482a8a80e15a0f00cc7a', msg_handler);
}

(function(root) { function embed_document(root) {

var docs_json = {"5807e793-de77-4450-b17a-357fc5dac762":{"roots":{"references":[{"attributes":{"children":[{"id":"1268","type":"Div"},{"id":"1269","type":"Select"},{"id":"1288","type":"Select"},{"id":"1307","type":"ColorPicker"}],"margin":[0,0,0,0],"name":"Column01533"},"id":"1267","type":"Column"},{"attributes":{"grid_line_color":null,"ticker":{"id":"1339","type":"BasicTicker"}},"id":"1342","type":"Grid"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1308","type":"CustomJS"},{"attributes":{"axis_label":"hp","bounds":"auto","formatter":{"id":"1370","type":"BasicTickFormatter"},"major_label_orientation":"horizontal","ticker":{"id":"1344","type":"BasicTicker"}},"id":"1343","type":"LinearAxis"},{"attributes":{},"id":"1334","type":"LinearScale"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'value') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['value'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {value: cb_obj['value'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1304","type":"CustomJS"},{"attributes":{},"id":"1339","type":"BasicTicker"},{"attributes":{"below":[{"id":"1338","type":"LinearAxis"}],"center":[{"id":"1342","type":"Grid"},{"id":"1347","type":"Grid"}],"left":[{"id":"1343","type":"LinearAxis"}],"margin":null,"min_border_bottom":10,"min_border_left":10,"min_border_right":10,"min_border_top":10,"plot_height":300,"plot_width":700,"renderers":[{"id":"1366","type":"GlyphRenderer"}],"sizing_mode":"fixed","title":{"id":"1330","type":"Title"},"toolbar":{"id":"1353","type":"Toolbar"},"x_range":{"id":"1326","type":"Range1d"},"x_scale":{"id":"1334","type":"LinearScale"},"y_range":{"id":"1327","type":"Range1d"},"y_scale":{"id":"1336","type":"LinearScale"}},"id":"1329","subtype":"Figure","type":"Plot"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'sizing_mode') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['sizing_mode'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {sizing_mode: cb_obj['sizing_mode'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1303","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1277","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1317","type":"CustomJS"},{"attributes":{"text":"","text_color":{"value":"black"},"text_font_size":{"value":"12pt"}},"id":"1330","type":"Title"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1278","type":"CustomJS"},{"attributes":{},"id":"1336","type":"LinearScale"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'sizing_mode') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['sizing_mode'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {sizing_mode: cb_obj['sizing_mode'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1284","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1316","type":"CustomJS"},{"attributes":{"callback":null,"data":{"hp":[130,165,150,150,140,198,220,215,225,190,170,160,150,225,95,95,97,85,88,46,87,90,95,113,90,215,200,210,193,88,90,95,100,105,100,88,100,165,175,153,150,180,170,175,110,72,100,88,86,90,70,76,65,69,60,70,95,80,54,90,86,165,175,150,153,150,208,155,160,190,97,150,130,140,150,112,76,87,69,86,92,97,80,88,175,150,145,137,150,198,150,158,150,215,225,175,105,100,100,88,95,46,150,167,170,180,100,88,72,94,90,85,107,90,145,230,49,75,91,112,150,110,122,180,95,100,100,67,80,65,75,100,110,105,140,150,150,140,150,83,67,78,52,61,75,75,75,97,93,67,95,105,72,72,170,145,150,148,110,105,110,95,110,110,129,75,83,100,78,96,71,97,97,70,90,95,88,98,115,53,86,81,92,79,83,140,150,120,152,100,105,81,90,52,60,70,53,100,78,110,95,71,70,75,72,102,150,88,108,120,180,145,130,150,68,80,58,96,70,145,110,145,130,110,105,100,98,180,170,190,149,78,88,75,89,63,83,67,78,97,110,110,48,66,52,70,60,110,140,139,105,95,85,88,100,90,105,85,110,120,145,165,139,140,68,95,97,75,95,105,85,97,103,125,115,133,71,68,115,85,88,90,110,130,129,138,135,155,142,125,150,71,65,80,80,77,125,71,90,70,70,65,69,90,115,115,90,76,60,70,65,90,88,90,90,78,90,75,92,75,65,105,65,48,48,67,67,67,67,62,132,100,88,72,84,84,92,110,84,58,64,60,67,65,62,68,63,65,65,74,75,75,100,74,80,76,116,120,110,105,88,85,88,88,88,85,84,90,92,74,68,68,63,70,88,75,70,67,67,67,110,85,92,112,96,84,90,86,52,84,79,82],"mpg":{"ndarray":"AAAAAAAAMkAAAAAAAAAuQAAAAAAAADJAAAAAAAAAMEAAAAAAAAAxQAAAAAAAAC5AAAAAAAAALEAAAAAAAAAsQAAAAAAAACxAAAAAAAAALkAAAAAAAAAuQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADhAAAAAAAAANkAAAAAAAAAyQAAAAAAAADVAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADlAAAAAAAAAOEAAAAAAAAA5QAAAAAAAADpAAAAAAAAANUAAAAAAAAAkQAAAAAAAACRAAAAAAAAAJkAAAAAAAAAiQAAAAAAAADtAAAAAAAAAPEAAAAAAAAA5QAAAAAAAADNAAAAAAAAAMEAAAAAAAAAxQAAAAAAAADNAAAAAAAAAMkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAAsQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAADJAAAAAAAAANkAAAAAAAAAzQAAAAAAAADJAAAAAAAAAN0AAAAAAAAA8QAAAAAAAAD5AAAAAAAAAPkAAAAAAAAA/QAAAAAAAgEFAAAAAAAAAO0AAAAAAAAA6QAAAAAAAADhAAAAAAAAAOUAAAAAAAAA3QAAAAAAAADRAAAAAAAAANUAAAAAAAAAqQAAAAAAAACxAAAAAAAAALkAAAAAAAAAsQAAAAAAAADFAAAAAAAAAJkAAAAAAAAAqQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAzQAAAAAAAAC5AAAAAAAAAKkAAAAAAAAAqQAAAAAAAACxAAAAAAAAAMkAAAAAAAAA2QAAAAAAAADVAAAAAAAAAOkAAAAAAAAA2QAAAAAAAADxAAAAAAAAAN0AAAAAAAAA8QAAAAAAAADtAAAAAAAAAKkAAAAAAAAAsQAAAAAAAACpAAAAAAAAALEAAAAAAAAAuQAAAAAAAAChAAAAAAAAAKkAAAAAAAAAqQAAAAAAAACxAAAAAAAAAKkAAAAAAAAAoQAAAAAAAACpAAAAAAAAAMkAAAAAAAAAwQAAAAAAAADJAAAAAAAAAMkAAAAAAAAA3QAAAAAAAADpAAAAAAAAAJkAAAAAAAAAoQAAAAAAAACpAAAAAAAAAKEAAAAAAAAAyQAAAAAAAADRAAAAAAAAANUAAAAAAAAA2QAAAAAAAADJAAAAAAAAAM0AAAAAAAAA1QAAAAAAAADpAAAAAAAAALkAAAAAAAAAwQAAAAAAAAD1AAAAAAAAAOEAAAAAAAAA0QAAAAAAAADNAAAAAAAAALkAAAAAAAAA4QAAAAAAAADRAAAAAAAAAJkAAAAAAAAA0QAAAAAAAADNAAAAAAAAALkAAAAAAAAA/QAAAAAAAADpAAAAAAAAAQEAAAAAAAAA5QAAAAAAAADBAAAAAAAAAMEAAAAAAAAAyQAAAAAAAADBAAAAAAAAAKkAAAAAAAAAsQAAAAAAAACxAAAAAAAAALEAAAAAAAAA9QAAAAAAAADpAAAAAAAAAOkAAAAAAAAA/QAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA4QAAAAAAAADpAAAAAAAAAOEAAAAAAAAA6QAAAAAAAAD9AAAAAAAAAM0AAAAAAAAAyQAAAAAAAAC5AAAAAAAAALkAAAAAAAAAwQAAAAAAAAC5AAAAAAAAAMEAAAAAAAAAsQAAAAAAAADFAAAAAAAAAMEAAAAAAAAAuQAAAAAAAADJAAAAAAAAANUAAAAAAAAA0QAAAAAAAACpAAAAAAAAAPUAAAAAAAAA3QAAAAAAAADRAAAAAAAAAN0AAAAAAAAA4QAAAAAAAADlAAAAAAAAAOEAAAAAAAAAyQAAAAAAAAD1AAAAAAAAAM0AAAAAAAAA3QAAAAAAAADdAAAAAAAAANkAAAAAAAAA5QAAAAAAAgEBAAAAAAAAAPEAAAAAAAAA5QAAAAAAAADlAAAAAAAAAOkAAAAAAAAA7QAAAAAAAgDFAAAAAAAAAMEAAAAAAAAAvQAAAAAAAAC1AAAAAAAAANkAAAAAAAAA2QAAAAAAAADhAAAAAAACANkAAAAAAAAA9QAAAAAAAgDhAAAAAAAAAPUAAAAAAAIBAQAAAAAAAADRAAAAAAAAAMkAAAAAAAIAyQAAAAAAAgDFAAAAAAACAPUAAAAAAAABAQAAAAAAAADxAAAAAAACAOkAAAAAAAAA0QAAAAAAAACpAAAAAAAAAM0AAAAAAAAAzQAAAAAAAgDBAAAAAAACAMEAAAAAAAAAqQAAAAAAAACpAAAAAAAAAKkAAAAAAAIA/QAAAAAAAAD5AAAAAAAAAQkAAAAAAAIA5QAAAAAAAwEBAAAAAAACAMUAAAAAAAAAxQAAAAAAAAC9AAAAAAAAALkAAAAAAAIAxQAAAAAAAgDRAAAAAAAAAM0AAAAAAAIAyQAAAAAAAADBAAAAAAAAAL0AAAAAAAAAvQAAAAAAAADBAAAAAAAAAPUAAAAAAAIA4QAAAAAAAADpAAAAAAACAOUAAAAAAAIA+QAAAAAAAwEBAAAAAAAAAPkAAAAAAAIA+QAAAAAAAADZAAAAAAACANUAAAAAAAIA1QM3MzMzMjEVAzczMzMwMQkBmZmZmZmZAQDMzMzMzs0NAzczMzMwMQkBmZmZmZuYzQGZmZmZmZjNAMzMzMzMzNEAzMzMzMzMzQAAAAAAAgDRAMzMzMzMzNECamZmZmRk5QAAAAAAAgDRAZmZmZmZmM0CamZmZmZk0QM3MzMzMzDRAmpmZmZmZMkCamZmZmRkyQDMzMzMzMzNAMzMzMzOzMUCamZmZmRkyQAAAAAAAgDFAAAAAAAAAPkAAAAAAAIA7QDMzMzMzMztAZmZmZmbmPkCamZmZmRk1QDMzMzMzMzdAzczMzMzMN0BmZmZmZuY3QM3MzMzMTDRAAAAAAAAAMUCamZmZmZk1QDMzMzMzMzBAAAAAAACAP0AAAAAAAIA9QAAAAAAAgDVAzczMzMzMM0DNzMzMzEw2QDMzMzMzMzRAmpmZmZmZNEAAAAAAAAAxQJqZmZmZmTFAAAAAAACAMEAzMzMzMzMyQGZmZmZm5jBAAAAAAAAAL0AzMzMzMzMzQAAAAAAAgDJAZmZmZmbmP0DNzMzMzAxBQJqZmZmZ2UFAZmZmZmZmO0BmZmZmZmY5QAAAAAAAADdAMzMzMzMzO0BmZmZmZuY3QJqZmZmZGUFAAAAAAABAQUDNzMzMzMw/QGZmZmZmpkJAZmZmZmZmPEDNzMzMzMw8QM3MzMzMzDpAAAAAAADAQEAAAAAAAMBEQM3MzMzMDENAzczMzMwMQECamZmZmZlCQAAAAAAAADxAZmZmZmZmOkDNzMzMzEw4QJqZmZmZGTNAZmZmZmYmQUDNzMzMzMw9QM3MzMzMTD9AAAAAAACAQkCamZmZmRlAQM3MzMzMTEdAZmZmZmbmO0BmZmZmZmZEQGZmZmZmJkZAMzMzMzOzRUAzMzMzMzNCQAAAAAAAAD5AzczMzMxMRkBmZmZmZuZAQM3MzMzMzD1AmpmZmZlZQEAzMzMzM7M3QAAAAAAAgEFAMzMzMzMzQEAzMzMzMzM7QJqZmZmZmTpAzczMzMzMOUAAAAAAAIA3QAAAAAAAAD5AzczMzMyMQ0AAAAAAAIBDQM3MzMzMjEFAZmZmZmYmQEAAAAAAAIBCQJqZmZmZ2UJAzczMzMwMQUCamZmZmVlBQDMzMzMzM0FAZmZmZmbmPUAAAAAAAIBAQJqZmZmZ2UBAMzMzMzMzQEAzMzMzM3NAQJqZmZmZmT9AmpmZmZkZPEAzMzMzM7M+QGZmZmZmZjlAMzMzMzMzOEBmZmZmZmY2QJqZmZmZmTpAMzMzMzMzNECamZmZmZkxQAAAAAAAADxAAAAAAAAAO0AAAAAAAABBQAAAAAAAAD9AAAAAAAAAPUAAAAAAAAA7QAAAAAAAADhAAAAAAAAAQkAAAAAAAIBCQAAAAAAAAD9AAAAAAAAAQ0AAAAAAAABCQAAAAAAAAEJAAAAAAAAAQkAAAAAAAABBQAAAAAAAAENAAAAAAAAAQEAAAAAAAABDQAAAAAAAADlAAAAAAAAAQ0AAAAAAAAA6QAAAAAAAADZAAAAAAAAAQEAAAAAAAABCQAAAAAAAADtAAAAAAAAAO0AAAAAAAABGQAAAAAAAAEBAAAAAAAAAPEAAAAAAAAA/QA==","dtype":"float64","shape":[392]}},"selected":{"id":"1361","type":"Selection"},"selection_policy":{"id":"1379","type":"UnionRenderers"}},"id":"1360","type":"ColumnDataSource"},{"attributes":{"axis_label":"mpg","bounds":"auto","formatter":{"id":"1368","type":"BasicTickFormatter"},"major_label_orientation":"horizontal","ticker":{"id":"1339","type":"BasicTicker"}},"id":"1338","type":"LinearAxis"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'options') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['options'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {options: cb_obj['options'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1283","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1315","type":"CustomJS"},{"attributes":{},"id":"1344","type":"BasicTicker"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'title') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['title'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {title: cb_obj['title'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1282","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1314","type":"CustomJS"},{"attributes":{"dimension":1,"grid_line_color":null,"ticker":{"id":"1344","type":"BasicTicker"}},"id":"1347","type":"Grid"},{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"1377","type":"BoxAnnotation"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1281","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1313","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1280","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1312","type":"CustomJS"},{"attributes":{},"id":"1361","type":"Selection"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1311","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1310","type":"CustomJS"},{"attributes":{},"id":"1348","type":"SaveTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'title') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['title'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {title: cb_obj['title'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1301","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1309","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1300","type":"CustomJS"},{"attributes":{},"id":"1349","type":"PanTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1318","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1299","type":"CustomJS"},{"attributes":{},"id":"1350","type":"WheelZoomTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1298","type":"CustomJS"},{"attributes":{"overlay":{"id":"1377","type":"BoxAnnotation"}},"id":"1351","type":"BoxZoomTool"},{"attributes":{"callback":null,"js_property_callbacks":{"change:align":[{"id":"1270","type":"CustomJS"}],"change:aspect_ratio":[{"id":"1271","type":"CustomJS"}],"change:background":[{"id":"1272","type":"CustomJS"}],"change:css_classes":[{"id":"1273","type":"CustomJS"}],"change:disabled":[{"id":"1274","type":"CustomJS"}],"change:height":[{"id":"1275","type":"CustomJS"}],"change:height_policy":[{"id":"1276","type":"CustomJS"}],"change:margin":[{"id":"1277","type":"CustomJS"}],"change:max_height":[{"id":"1278","type":"CustomJS"}],"change:max_width":[{"id":"1279","type":"CustomJS"}],"change:min_height":[{"id":"1280","type":"CustomJS"}],"change:min_width":[{"id":"1281","type":"CustomJS"}],"change:options":[{"id":"1283","type":"CustomJS"}],"change:sizing_mode":[{"id":"1284","type":"CustomJS"}],"change:title":[{"id":"1282","type":"CustomJS"}],"change:value":[{"id":"1285","type":"CustomJS"}],"change:width":[{"id":"1286","type":"CustomJS"}],"change:width_policy":[{"id":"1287","type":"CustomJS"}]},"margin":[5,10,5,10],"options":["mpg","cyl","displ","hp","weight","accel","yr"],"title":"x","value":"mpg"},"id":"1269","type":"Select"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1297","type":"CustomJS"},{"attributes":{},"id":"1352","type":"ResetTool"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_multi":null,"active_scroll":"auto","active_tap":"auto","tools":[{"id":"1328","type":"HoverTool"},{"id":"1348","type":"SaveTool"},{"id":"1349","type":"PanTool"},{"id":"1350","type":"WheelZoomTool"},{"id":"1351","type":"BoxZoomTool"},{"id":"1352","type":"ResetTool"}]},"id":"1353","type":"Toolbar"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1305","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1296","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1270","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1295","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1271","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1294","type":"CustomJS"},{"attributes":{"fill_color":{"value":"#AA0505"},"line_color":{"value":"#AA0505"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1363","type":"Scatter"},{"attributes":{"fill_alpha":{"value":0.1},"fill_color":{"value":"#AA0505"},"line_alpha":{"value":0.1},"line_color":{"value":"#AA0505"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1364","type":"Scatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1272","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1293","type":"CustomJS"},{"attributes":{"callback":null,"renderers":[{"id":"1366","type":"GlyphRenderer"}],"tags":["hv_created"],"tooltips":[["mpg","@{mpg}"],["hp","@{hp}"]]},"id":"1328","type":"HoverTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1273","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1306","type":"CustomJS"},{"attributes":{"fill_alpha":{"value":0.2},"fill_color":{"value":"#AA0505"},"line_alpha":{"value":0.2},"line_color":{"value":"#AA0505"},"size":{"units":"screen","value":5.477225575051661},"x":{"field":"mpg"},"y":{"field":"hp"}},"id":"1365","type":"Scatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1292","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1274","type":"CustomJS"},{"attributes":{"callback":null,"end":46.6,"reset_end":46.6,"reset_start":9.0,"start":9.0,"tags":[[["mpg","mpg",null]]]},"id":"1326","type":"Range1d"},{"attributes":{"data_source":{"id":"1360","type":"ColumnDataSource"},"glyph":{"id":"1363","type":"Scatter"},"hover_glyph":null,"muted_glyph":{"id":"1365","type":"Scatter"},"nonselection_glyph":{"id":"1364","type":"Scatter"},"selection_glyph":null,"view":{"id":"1367","type":"CDSView"}},"id":"1366","type":"GlyphRenderer"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1275","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1290","type":"CustomJS"},{"attributes":{"callback":null,"end":230.0,"reset_end":230.0,"reset_start":46.0,"start":46.0,"tags":[[["hp","hp",null]]]},"id":"1327","type":"Range1d"},{"attributes":{"source":{"id":"1360","type":"ColumnDataSource"}},"id":"1367","type":"CDSView"},{"attributes":{},"id":"1368","type":"BasicTickFormatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1276","type":"CustomJS"},{"attributes":{"callback":null,"js_property_callbacks":{"change:align":[{"id":"1289","type":"CustomJS"}],"change:aspect_ratio":[{"id":"1290","type":"CustomJS"}],"change:background":[{"id":"1291","type":"CustomJS"}],"change:css_classes":[{"id":"1292","type":"CustomJS"}],"change:disabled":[{"id":"1293","type":"CustomJS"}],"change:height":[{"id":"1294","type":"CustomJS"}],"change:height_policy":[{"id":"1295","type":"CustomJS"}],"change:margin":[{"id":"1296","type":"CustomJS"}],"change:max_height":[{"id":"1297","type":"CustomJS"}],"change:max_width":[{"id":"1298","type":"CustomJS"}],"change:min_height":[{"id":"1299","type":"CustomJS"}],"change:min_width":[{"id":"1300","type":"CustomJS"}],"change:options":[{"id":"1302","type":"CustomJS"}],"change:sizing_mode":[{"id":"1303","type":"CustomJS"}],"change:title":[{"id":"1301","type":"CustomJS"}],"change:value":[{"id":"1304","type":"CustomJS"}],"change:width":[{"id":"1305","type":"CustomJS"}],"change:width_policy":[{"id":"1306","type":"CustomJS"}]},"margin":[5,10,5,10],"options":["mpg","cyl","displ","hp","weight","accel","yr"],"title":"y","value":"hp"},"id":"1288","type":"Select"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1287","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1319","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'value') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['value'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {value: cb_obj['value'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1285","type":"CustomJS"},{"attributes":{"children":[{"id":"1267","type":"Column"},{"id":"1325","type":"Row"}],"margin":[0,0,0,0],"name":"Row01568"},"id":"1266","type":"Row"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'title') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['title'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {title: cb_obj['title'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1320","type":"CustomJS"},{"attributes":{"margin":[5,5,5,5],"name":"Markdown01531","text":"

MPG Explorer

"},"id":"1268","type":"Div"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'sizing_mode') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['sizing_mode'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {sizing_mode: cb_obj['sizing_mode'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1321","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'color') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['color'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {color: cb_obj['color'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1322","type":"CustomJS"},{"attributes":{},"id":"1370","type":"BasicTickFormatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1323","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'options') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['options'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {options: cb_obj['options'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1302","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "7955eed2f1604750ba874916ec4b416d", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["7955eed2f1604750ba874916ec4b416d"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "7955eed2f1604750ba874916ec4b416d";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1324","type":"CustomJS"},{"attributes":{"children":[{"id":"1329","subtype":"Figure","type":"Plot"}],"margin":[0,0,0,0],"name":"Row01567"},"id":"1325","type":"Row"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1291","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "b3528e64550f4629b57988247b7b719e", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["b3528e64550f4629b57988247b7b719e"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "b3528e64550f4629b57988247b7b719e";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1289","type":"CustomJS"},{"attributes":{"callback":null,"color":"#aa0505","js_property_callbacks":{"change:align":[{"id":"1308","type":"CustomJS"}],"change:aspect_ratio":[{"id":"1309","type":"CustomJS"}],"change:background":[{"id":"1310","type":"CustomJS"}],"change:color":[{"id":"1322","type":"CustomJS"}],"change:css_classes":[{"id":"1311","type":"CustomJS"}],"change:disabled":[{"id":"1312","type":"CustomJS"}],"change:height":[{"id":"1313","type":"CustomJS"}],"change:height_policy":[{"id":"1314","type":"CustomJS"}],"change:margin":[{"id":"1315","type":"CustomJS"}],"change:max_height":[{"id":"1316","type":"CustomJS"}],"change:max_width":[{"id":"1317","type":"CustomJS"}],"change:min_height":[{"id":"1318","type":"CustomJS"}],"change:min_width":[{"id":"1319","type":"CustomJS"}],"change:sizing_mode":[{"id":"1321","type":"CustomJS"}],"change:title":[{"id":"1320","type":"CustomJS"}],"change:width":[{"id":"1323","type":"CustomJS"}],"change:width_policy":[{"id":"1324","type":"CustomJS"}]},"margin":[5,10,5,10],"title":"Color"},"id":"1307","type":"ColorPicker"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1286","type":"CustomJS"},{"attributes":{},"id":"1379","type":"UnionRenderers"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1266'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1266", "a76ef97dea464d0897b68b638852caf4", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["a76ef97dea464d0897b68b638852caf4"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "a76ef97dea464d0897b68b638852caf4";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1279","type":"CustomJS"}],"root_ids":["1266"]},"title":"Bokeh Application","version":"1.2.0"}}; var render_items = [{"docid":"5807e793-de77-4450-b17a-357fc5dac762","roots":{"1266":"b9e4fcc6-8341-40ea-8922-c86f8d710a66"}}]; 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) { embed_document(root); clearInterval(timer); } attempts++; if (attempts > 100) { console.log("Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing"); clearInterval(timer); } }, 10, root) } })(window);</script>

Parameterized Class Functions

The Param library allows expressing the parameters of a class (or a hierarchy of classes) completely independently of a GUI implementation. Panel and other libraries can then take those parameter declarations and turn them into a GUI to control the parameters. This approach allows the parameters controlling some computation to be captured specifically and explicitly (but as abstract parameters, not as widgets). Then thanks to the param.depends decorator, it is then possible to directly express the dependencies between the parameters and the computation defined in some method on the class, all without ever importing Panel or any other GUI library. The resulting objects can then be used in both GUI and non-GUI contexts (batch computations, scripts, servers).

The parameterized approach is a powerful way to encapsulate computation in self-contained classes, taking advantage of object-oriented programming patterns. It also makes it possible to express a problem completely independently from Panel or any other GUI code, while still getting a GUI for free as a last step.

Pros:

  • Declarative way of expressing parameters and dependencies between parameters and computation
  • The resulting code is not tied to any particular GUI framework and can be used in other contexts as well

Cons:

  • Requires writing classes
  • Less explicit about widgets to use for each parameter; can be harder to customize behavior than if widgets are instantiated explicitly
import param

class MPGExplorer(param.Parameterized):

    x = param.Selector(objects=columns)
    y = param.Selector(default='hp', objects=columns)
    color = param.Color(default='#0f0f0f')
    
    @param.depends('x', 'y', 'color') # optional in this case
    def plot(self):
        return autompg_plot(self.x, self.y, self.color)

explorer = MPGExplorer()

pn.Row(explorer.param, explorer.plot)
<script type="application/javascript"> function msg_handler(msg) { var metadata = msg.metadata; var buffers = msg.buffers; var msg = msg.content.data; if ((metadata.msg_type == "Ready")) { if (metadata.content) { console.log("Python callback returned following output:", metadata.content); } } else if (metadata.msg_type == "Error") { console.log("Python failed with the following traceback:", metadata.traceback) } else {

var plot_id = "1420"; if (plot_id in window.PyViz.plot_index) { var plot = window.PyViz.plot_index[plot_id]; } else { var plot = Bokeh.index[plot_id]; }

if (plot_id in window.PyViz.receivers) { var receiver = window.PyViz.receivers[plot_id]; } else if (Bokeh.protocol === undefined) { return; } else { var receiver = new Bokeh.protocol.Receiver(); window.PyViz.receivers[plot_id] = receiver; }

if ((buffers != undefined) && (buffers.length > 0)) { receiver.consume(buffers[0].buffer) } else { receiver.consume(msg) }

const comm_msg = receiver.message; if ((comm_msg != null) && (Object.keys(comm_msg.content).length > 0)) { plot.model.document.apply_json_patch(comm_msg.content, comm_msg.buffers) }

  }
}
if ((window.PyViz == undefined) || (!window.PyViz.comm_manager)) {
  console.log("Could not find comm manager")
} else {
  window.PyViz.comm_manager.register_target('1420', 'e860cbf9657f405184aab71e825f2e82', msg_handler);
}

(function(root) { function embed_document(root) {

var docs_json = {"8b6111fd-a863-405f-8212-60ca2be0eac9":{"roots":{"references":[{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1442","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "917d11d4c0e64f72b0a8dabe6f35a622", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["917d11d4c0e64f72b0a8dabe6f35a622"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["917d11d4c0e64f72b0a8dabe6f35a622"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "917d11d4c0e64f72b0a8dabe6f35a622";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1477","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1443","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "917d11d4c0e64f72b0a8dabe6f35a622", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["917d11d4c0e64f72b0a8dabe6f35a622"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["917d11d4c0e64f72b0a8dabe6f35a622"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "917d11d4c0e64f72b0a8dabe6f35a622";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1478","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1444","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1426","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1445","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1446","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1434","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'align') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['align'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {align: cb_obj['align'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1480","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1447","type":"CustomJS"},{"attributes":{"callback":null,"end":46.6,"reset_end":46.6,"reset_start":9.0,"start":9.0,"tags":[[["mpg","mpg",null]]]},"id":"1498","type":"Range1d"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1481","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1425","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1448","type":"CustomJS"},{"attributes":{},"id":"1542","type":"BasicTickFormatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'background') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['background'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {background: cb_obj['background'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1482","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1449","type":"CustomJS"},{"attributes":{"callback":null,"end":230.0,"reset_end":230.0,"reset_start":46.0,"start":46.0,"tags":[[["hp","hp",null]]]},"id":"1499","type":"Range1d"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'css_classes') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['css_classes'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {css_classes: cb_obj['css_classes'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1483","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1450","type":"CustomJS"},{"attributes":{"callback":null,"renderers":[{"id":"1538","type":"GlyphRenderer"}],"tags":["hv_created"],"tooltips":[["mpg","@{mpg}"],["hp","@{hp}"]]},"id":"1500","type":"HoverTool"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1484","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1451","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1485","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'aspect_ratio') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['aspect_ratio'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {aspect_ratio: cb_obj['aspect_ratio'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1424","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1452","type":"CustomJS"},{"attributes":{},"id":"1540","type":"BasicTickFormatter"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'disabled') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['disabled'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {disabled: cb_obj['disabled'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1427","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height_policy: cb_obj['height_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1486","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1453","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'margin') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['margin'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {margin: cb_obj['margin'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1487","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'title') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['title'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {title: cb_obj['title'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1454","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1488","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_height: cb_obj['max_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1431","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'options') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['options'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {options: cb_obj['options'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1455","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'max_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['max_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {max_width: cb_obj['max_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1489","type":"CustomJS"},{"attributes":{},"id":"1551","type":"UnionRenderers"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'sizing_mode') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['sizing_mode'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {sizing_mode: cb_obj['sizing_mode'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1456","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {height: cb_obj['height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1428","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_height') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_height'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_height: cb_obj['min_height'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1490","type":"CustomJS"},{"attributes":{"source":{"id":"1532","type":"ColumnDataSource"}},"id":"1539","type":"CDSView"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width_policy') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width_policy'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width_policy: cb_obj['width_policy'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "67d63afcd08b4c9c97e7fcf7027310dd", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["67d63afcd08b4c9c97e7fcf7027310dd"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "67d63afcd08b4c9c97e7fcf7027310dd";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1439","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'value') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['value'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {value: cb_obj['value'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "2ad10a192a7f4e2795d74cd892e854f7";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1457","type":"CustomJS"},{"attributes":{"below":[{"id":"1510","type":"LinearAxis"}],"center":[{"id":"1514","type":"Grid"},{"id":"1519","type":"Grid"}],"left":[{"id":"1515","type":"LinearAxis"}],"margin":null,"min_border_bottom":10,"min_border_left":10,"min_border_right":10,"min_border_top":10,"plot_height":300,"plot_width":700,"renderers":[{"id":"1538","type":"GlyphRenderer"}],"sizing_mode":"fixed","title":{"id":"1502","type":"Title"},"toolbar":{"id":"1525","type":"Toolbar"},"x_range":{"id":"1498","type":"Range1d"},"x_scale":{"id":"1506","type":"LinearScale"},"y_range":{"id":"1499","type":"Range1d"},"y_scale":{"id":"1508","type":"LinearScale"}},"id":"1501","subtype":"Figure","type":"Plot"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'min_width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['min_width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {min_width: cb_obj['min_width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "55d79679ec05463fa00c9f66a4fb2089", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["55d79679ec05463fa00c9f66a4fb2089"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndata['comm_id'] = "55d79679ec05463fa00c9f66a4fb2089";\ntimeout = comm_status.time + 20000;\nif ((comm_status.blocked && (Date.now() < timeout))) {\n comm_status.event_buffer.unshift([event_name, data]);\n} else {\n comm_status.event_buffer.unshift([event_name, data]);\n setTimeout(function() { process_events(comm_status); }, 50);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n}\n"},"id":"1491","type":"CustomJS"},{"attributes":{"code":"\nif (!window.PyViz) {\n return;\n}\nvar receiver = window.PyViz.receivers['1420'];\nvar events = receiver ? receiver._partial.content.events : [];\nfor (var event of events) {\n if ((event.kind == 'ModelChanged') && (event.attr == 'width') &&\n (cb_obj.id == event.model.id) &&\n (cb_obj['width'] == event.new)) {\n events.pop(events.indexOf(event))\n return;\n }\n}\n\ndata = {width: cb_obj['width'], 'id': cb_obj.id};\n\nfunction unique_events(events) {\n // Processes the event queue ignoring duplicate events\n // of the same type\n var unique = [];\n var unique_events = [];\n for (var i=0; i<events.length; i++) {\n var _tmpevent = events[i];\n event = _tmpevent[0];\n data = _tmpevent[1];\n if (unique_events.indexOf(event)===-1) {\n unique.unshift(data);\n unique_events.push(event);\n }\n }\n return unique;\n}\n\nfunction process_events(comm_status) {\n // Iterates over event queue and sends events via Comm\n var events = unique_events(comm_status.event_buffer);\n for (var i=0; i<events.length; i++) {\n var data = events[i];\n var comm = window.PyViz.comms[data["comm_id"]];\n comm.send(data);\n }\n comm_status.event_buffer = [];\n}\n\nfunction on_msg(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n var metadata = msg.metadata;\n var comm_id = metadata.comm_id\n var comm_status = window.PyViz.comm_status[comm_id];\n if (comm_status.event_buffer.length) {\n process_events(comm_status);\n comm_status.blocked = true;\n comm_status.time = Date.now()+50;\n } else {\n comm_status.blocked = false;\n }\n comm_status.event_buffer = [];\n if ((metadata.msg_type == "Ready") && metadata.content) {\n console.log("Python callback returned following output:", metadata.content);\n } else if (metadata.msg_type == "Error") {\n console.log("Python failed with the following traceback:", metadata.traceback)\n }\n}\n\n// Initialize Comm\nif ((window.PyViz == undefined) || (window.PyViz.comm_manager == undefined)) { return }\ncomm = window.PyViz.comm_manager.get_client_comm("1420", "2ad10a192a7f4e2795d74cd892e854f7", on_msg);\nif (!comm) {\n return\n}\n\n// Initialize event queue and timeouts for Comm\nvar comm_status = window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"];\nif (comm_status === undefined) {\n comm_status = {event_buffer: [], blocked: false, time: Date.now()}\n window.PyViz.comm_status["2ad10a192a7f4e2795d74cd892e854f7"] = comm_status\n}\n\n// Add current event to queue and process queue if not blocked\nevent_name = cb_obj.event_name\ndat