Skip to content

Instantly share code, notes, and snippets.

@kevincolten
Created August 12, 2015 16:53
Show Gist options
  • Save kevincolten/0845890e64de3b854aaa to your computer and use it in GitHub Desktop.
Save kevincolten/0845890e64de3b854aaa to your computer and use it in GitHub Desktop.
Comparing Consecutively Ran Bokeh Plots
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>line.py example</title>
<link rel="stylesheet" href="bokehjs/build/css/bokeh.css" type="text/css" />
<script type="text/javascript" src="bokehjs/build/js/bokeh.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
<script type="text/javascript">
Bokeh.$(function() {
var all_models = [{"attributes": {"end": 293.5, "callback": null, "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "tags": [], "start": -24.5, "id": "66b64474-8d6d-4868-8014-cda75a71491a"}, "type": "Range1d", "id": "66b64474-8d6d-4868-8014-cda75a71491a"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "dimensions": ["width", "height"], "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "81551c5d-c624-41f5-8d05-7ae070f1dda9"}, "type": "PanTool", "id": "81551c5d-c624-41f5-8d05-7ae070f1dda9"}, {"attributes": {"tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "renderers": [], "callback": null, "names": [], "id": "3ebd1fc7-5db8-4c7b-a699-a378b9037f57"}, "type": "DataRange1d", "id": "3ebd1fc7-5db8-4c7b-a699-a378b9037f57"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "847b67a5-43ad-4548-8f78-89692040915d"}, "type": "PreviewSaveTool", "id": "847b67a5-43ad-4548-8f78-89692040915d"}, {"attributes": {"line_color": {"value": "#5ab738"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "y": {"field": "y_jython"}, "x": {"field": "x"}, "id": "ba9b6761-f723-4eb6-b4bd-fdf49e07c5db"}, "type": "Line", "id": "ba9b6761-f723-4eb6-b4bd-fdf49e07c5db"}, {"attributes": {"line_color": {"value": "#f22c40"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "y": {"field": "y_python"}, "x": {"field": "x"}, "id": "a5ae8be7-9c0f-4f44-b10c-cdf8bbbb7f78"}, "type": "Line", "id": "a5ae8be7-9c0f-4f44-b10c-cdf8bbbb7f78"}, {"attributes": {"doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "0913fb48-cba1-48d6-a6bc-a1f41c53f3ef", "tags": []}, "type": "BasicTickFormatter", "id": "0913fb48-cba1-48d6-a6bc-a1f41c53f3ef"}, {"attributes": {"tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "8fcb801c-d085-4cbd-a127-011bb50231bf", "children": [{"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}]}, "type": "PlotContext", "id": "8fcb801c-d085-4cbd-a127-011bb50231bf"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "dimensions": ["width", "height"], "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "4df403ef-118d-4670-bf06-b5fc0063b50f"}, "type": "BoxZoomTool", "id": "4df403ef-118d-4670-bf06-b5fc0063b50f"}, {"attributes": {"column_names": ["y_jython", "x", "y_python", "y_pypy"], "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "selected": {"2d": {"indices": []}, "1d": {"indices": []}, "0d": {"indices": [], "flag": false}}, "callback": null, "data": {"y_jython": [22, 43, 10, 25, 26, 101, 114, 203, 194, 215, 201, 227, 139, 160], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "y_python": [2, 3, 7, 5, 26, 221, 44, 233, 254, 265, 266, 267, 120, 111], "y_pypy": [12, 33, 47, 15, 126, 121, 144, 233, 254, 225, 226, 267, 110, 130]}, "id": "625c50ff-93e5-4e91-aef3-775ecd305519"}, "type": "ColumnDataSource", "id": "625c50ff-93e5-4e91-aef3-775ecd305519"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "dimension": 0, "ticker": {"type": "BasicTicker", "id": "612c138e-dc46-44ab-b592-b9a86253299c"}, "id": "95007493-2f12-4f8f-b9c8-dc51d4d48d96"}, "type": "Grid", "id": "95007493-2f12-4f8f-b9c8-dc51d4d48d96"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "6a7eceb7-be00-4259-af9d-a0b8939ffee3"}, "type": "ResetTool", "id": "6a7eceb7-be00-4259-af9d-a0b8939ffee3"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "dimensions": ["width", "height"], "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "4935f2aa-d148-4c90-9c7a-562bdf0c0699"}, "type": "WheelZoomTool", "id": "4935f2aa-d148-4c90-9c7a-562bdf0c0699"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "bdfd5668-6177-4627-ab0f-e54fbbb2ab08"}, "type": "ResizeTool", "id": "bdfd5668-6177-4627-ab0f-e54fbbb2ab08"}, {"attributes": {"geometries": [], "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "b858a2c7-97c7-40aa-bad0-f1b072d6675c"}, "type": "ToolEvents", "id": "b858a2c7-97c7-40aa-bad0-f1b072d6675c"}, {"attributes": {"tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "mantissas": [2, 5, 10], "id": "00d65172-45ad-4dc4-9aa7-2c9ee029f930"}, "type": "BasicTicker", "id": "00d65172-45ad-4dc4-9aa7-2c9ee029f930"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "axis_label": "measures", "formatter": {"type": "BasicTickFormatter", "id": "e58e677c-81c5-4bf9-b87d-1e1c5dda039c"}, "ticker": {"type": "BasicTicker", "id": "00d65172-45ad-4dc4-9aa7-2c9ee029f930"}, "id": "7261953c-29c8-41aa-b37f-db49c0e34542"}, "type": "LinearAxis", "id": "7261953c-29c8-41aa-b37f-db49c0e34542"}, {"attributes": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "625c50ff-93e5-4e91-aef3-775ecd305519"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "selection_glyph": null, "id": "7edba385-2bb5-45d4-aa17-438cca90afd0", "glyph": {"type": "Line", "id": "ba9b6761-f723-4eb6-b4bd-fdf49e07c5db"}}, "type": "GlyphRenderer", "id": "7edba385-2bb5-45d4-aa17-438cca90afd0"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "orientation": "top_left", "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "15cace82-41c4-40e8-a9f5-7d1f1de9a97a", "legends": [["python", [{"type": "GlyphRenderer", "id": "d751a12e-39c8-4a44-84ff-61aef78f35aa"}]], ["jython", [{"type": "GlyphRenderer", "id": "7edba385-2bb5-45d4-aa17-438cca90afd0"}]], ["pypy", [{"type": "GlyphRenderer", "id": "aa769959-a2b5-4bc4-9f03-e64043ba7d38"}]]]}, "type": "Legend", "id": "15cace82-41c4-40e8-a9f5-7d1f1de9a97a"}, {"attributes": {"doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "e58e677c-81c5-4bf9-b87d-1e1c5dda039c", "tags": []}, "type": "BasicTickFormatter", "id": "e58e677c-81c5-4bf9-b87d-1e1c5dda039c"}, {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa", "attributes": {"x_range": {"type": "DataRange1d", "id": "3ebd1fc7-5db8-4c7b-a699-a378b9037f57"}, "right": [], "above": [], "tags": [], "tools": [{"type": "PanTool", "id": "81551c5d-c624-41f5-8d05-7ae070f1dda9"}, {"type": "WheelZoomTool", "id": "4935f2aa-d148-4c90-9c7a-562bdf0c0699"}, {"type": "BoxZoomTool", "id": "4df403ef-118d-4670-bf06-b5fc0063b50f"}, {"type": "PreviewSaveTool", "id": "847b67a5-43ad-4548-8f78-89692040915d"}, {"type": "ResizeTool", "id": "bdfd5668-6177-4627-ab0f-e54fbbb2ab08"}, {"type": "ResetTool", "id": "6a7eceb7-be00-4259-af9d-a0b8939ffee3"}, {"type": "HelpTool", "id": "82bfe515-c758-4006-b0c4-76767932190e"}], "title": "Lines", "renderers": [{"type": "LinearAxis", "id": "4628e325-308f-4532-9c21-c327fd9ce597"}, {"type": "LinearAxis", "id": "7261953c-29c8-41aa-b37f-db49c0e34542"}, {"type": "Grid", "id": "95007493-2f12-4f8f-b9c8-dc51d4d48d96"}, {"type": "Grid", "id": "5f760e58-a89a-4704-93bd-5466fd93f43c"}, {"type": "GlyphRenderer", "id": "d751a12e-39c8-4a44-84ff-61aef78f35aa"}, {"type": "GlyphRenderer", "id": "7edba385-2bb5-45d4-aa17-438cca90afd0"}, {"type": "GlyphRenderer", "id": "aa769959-a2b5-4bc4-9f03-e64043ba7d38"}, {"type": "Legend", "id": "15cace82-41c4-40e8-a9f5-7d1f1de9a97a"}], "plot_width": 600, "extra_y_ranges": {}, "extra_x_ranges": {}, "tool_events": {"type": "ToolEvents", "id": "b858a2c7-97c7-40aa-bad0-f1b072d6675c"}, "plot_height": 400, "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa", "y_range": {"type": "Range1d", "id": "66b64474-8d6d-4868-8014-cda75a71491a"}, "below": [{"type": "LinearAxis", "id": "4628e325-308f-4532-9c21-c327fd9ce597"}], "left": [{"type": "LinearAxis", "id": "7261953c-29c8-41aa-b37f-db49c0e34542"}]}}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "dimension": 1, "ticker": {"type": "BasicTicker", "id": "00d65172-45ad-4dc4-9aa7-2c9ee029f930"}, "id": "5f760e58-a89a-4704-93bd-5466fd93f43c"}, "type": "Grid", "id": "5f760e58-a89a-4704-93bd-5466fd93f43c"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "axis_label": null, "formatter": {"type": "BasicTickFormatter", "id": "0913fb48-cba1-48d6-a6bc-a1f41c53f3ef"}, "ticker": {"type": "BasicTicker", "id": "612c138e-dc46-44ab-b592-b9a86253299c"}, "id": "4628e325-308f-4532-9c21-c327fd9ce597"}, "type": "LinearAxis", "id": "4628e325-308f-4532-9c21-c327fd9ce597"}, {"attributes": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "625c50ff-93e5-4e91-aef3-775ecd305519"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "selection_glyph": null, "id": "d751a12e-39c8-4a44-84ff-61aef78f35aa", "glyph": {"type": "Line", "id": "a5ae8be7-9c0f-4f44-b10c-cdf8bbbb7f78"}}, "type": "GlyphRenderer", "id": "d751a12e-39c8-4a44-84ff-61aef78f35aa"}, {"attributes": {"line_color": {"value": "#407ee7"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "y": {"field": "y_pypy"}, "x": {"field": "x"}, "id": "8a493db1-8af7-44b0-be20-590001063e1b"}, "type": "Line", "id": "8a493db1-8af7-44b0-be20-590001063e1b"}, {"attributes": {"tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "mantissas": [2, 5, 10], "id": "612c138e-dc46-44ab-b592-b9a86253299c"}, "type": "BasicTicker", "id": "612c138e-dc46-44ab-b592-b9a86253299c"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "8f0e9571-6a46-4751-a245-ca46bdbe5cfa"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "id": "82bfe515-c758-4006-b0c4-76767932190e"}, "type": "HelpTool", "id": "82bfe515-c758-4006-b0c4-76767932190e"}, {"attributes": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "625c50ff-93e5-4e91-aef3-775ecd305519"}, "tags": [], "doc": "1f8358f0-92c2-4bad-97db-a6f8b0875d90", "selection_glyph": null, "id": "aa769959-a2b5-4bc4-9f03-e64043ba7d38", "glyph": {"type": "Line", "id": "8a493db1-8af7-44b0-be20-590001063e1b"}}, "type": "GlyphRenderer", "id": "aa769959-a2b5-4bc4-9f03-e64043ba7d38"}];
Bokeh.load_models(all_models);
var plots = [{'modeltype': 'PlotContext', 'elementid': '#26a0a41f-b3a2-4414-817e-11dd43d47f17', 'modelid': '8fcb801c-d085-4cbd-a127-011bb50231bf'}];
for (idx in plots) {
var plot = plots[idx];
var model = Bokeh.Collections(plot.modeltype).get(plot.modelid);
Bokeh.logger.info('Realizing plot:')
Bokeh.logger.info(' - modeltype: ' + plot.modeltype);
Bokeh.logger.info(' - modelid: ' + plot.modelid);
Bokeh.logger.info(' - elementid: ' + plot.elementid);
var view = new model.default_view({
model: model,
el: plot.elementid
});
Bokeh.index[plot.modelid] = view;
}
});
</script>
</head>
<body>
<div class="plotdiv" id="26a0a41f-b3a2-4414-817e-11dd43d47f17"></div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>line.py example</title>
<link rel="stylesheet" href="bokehjs/build/css/bokeh.css" type="text/css" />
<script type="text/javascript" src="bokehjs/build/js/bokeh.js"></script>
<script type="text/javascript">
Bokeh.set_log_level("info");
</script>
<script type="text/javascript">
Bokeh.$(function() {
var all_models = [{"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "orientation": "top_left", "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "f06c7b5d-2f6e-4912-9a86-063cbfc5bc54", "legends": [["python", [{"type": "GlyphRenderer", "id": "5991c41a-f165-4fc0-b912-7dff7182b964"}]], ["jython", [{"type": "GlyphRenderer", "id": "f3919880-9117-4a09-8f6a-2189689c2bbe"}]], ["pypy", [{"type": "GlyphRenderer", "id": "7917ff0c-49a2-4898-916f-9ac8e7e0a6a6"}]]]}, "type": "Legend", "id": "f06c7b5d-2f6e-4912-9a86-063cbfc5bc54"}, {"attributes": {"tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "renderers": [], "callback": null, "names": [], "id": "c5fe9bcf-6fc1-4ad6-a505-2a44eea6e2fe"}, "type": "DataRange1d", "id": "c5fe9bcf-6fc1-4ad6-a505-2a44eea6e2fe"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "748ab0aa-8222-4b85-87be-711ff8d161ef"}, "type": "ResetTool", "id": "748ab0aa-8222-4b85-87be-711ff8d161ef"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "d5d557c4-e52f-471d-a3d2-f0c3b9a60489"}, "type": "PreviewSaveTool", "id": "d5d557c4-e52f-471d-a3d2-f0c3b9a60489"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "dimension": 1, "ticker": {"type": "BasicTicker", "id": "0d2e7f2d-0583-41a1-bb01-3002662d0e2f"}, "id": "6ec4d44c-8e26-48eb-8b9e-7a6ba217986c"}, "type": "Grid", "id": "6ec4d44c-8e26-48eb-8b9e-7a6ba217986c"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "dimensions": ["width", "height"], "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "38534bfc-21e4-4e12-b1ff-47ab84d5763e"}, "type": "PanTool", "id": "38534bfc-21e4-4e12-b1ff-47ab84d5763e"}, {"attributes": {"tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "mantissas": [2, 5, 10], "id": "0d2e7f2d-0583-41a1-bb01-3002662d0e2f"}, "type": "BasicTicker", "id": "0d2e7f2d-0583-41a1-bb01-3002662d0e2f"}, {"attributes": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "7c504fa7-7a7e-4c7b-92d4-aed1090cce0f"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "selection_glyph": null, "id": "f3919880-9117-4a09-8f6a-2189689c2bbe", "glyph": {"type": "Line", "id": "0fb996dc-d911-4203-8af1-1a28cc0fbf0c"}}, "type": "GlyphRenderer", "id": "f3919880-9117-4a09-8f6a-2189689c2bbe"}, {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158", "attributes": {"x_range": {"type": "DataRange1d", "id": "c5fe9bcf-6fc1-4ad6-a505-2a44eea6e2fe"}, "right": [], "above": [], "tags": [], "tools": [{"type": "PanTool", "id": "38534bfc-21e4-4e12-b1ff-47ab84d5763e"}, {"type": "WheelZoomTool", "id": "150ebe0f-737f-4ae4-a314-b4a28c9a3dae"}, {"type": "BoxZoomTool", "id": "e52ec4c6-956b-4ea7-acb0-7a493b7d2e37"}, {"type": "PreviewSaveTool", "id": "d5d557c4-e52f-471d-a3d2-f0c3b9a60489"}, {"type": "ResizeTool", "id": "9820e3dc-93f6-41ee-8cad-249e15059750"}, {"type": "ResetTool", "id": "748ab0aa-8222-4b85-87be-711ff8d161ef"}, {"type": "HelpTool", "id": "9162482b-9736-4d3d-b9d9-fb32cbf4f1c4"}], "title": "Lines", "renderers": [{"type": "LinearAxis", "id": "42649b9f-92f8-465b-9e1a-537070a8f1ae"}, {"type": "LinearAxis", "id": "39364f7a-043c-4959-abd6-416b9d9d1135"}, {"type": "Grid", "id": "dd500b40-5991-45b7-b640-0021f377da9d"}, {"type": "Grid", "id": "6ec4d44c-8e26-48eb-8b9e-7a6ba217986c"}, {"type": "GlyphRenderer", "id": "5991c41a-f165-4fc0-b912-7dff7182b964"}, {"type": "GlyphRenderer", "id": "f3919880-9117-4a09-8f6a-2189689c2bbe"}, {"type": "GlyphRenderer", "id": "7917ff0c-49a2-4898-916f-9ac8e7e0a6a6"}, {"type": "Legend", "id": "f06c7b5d-2f6e-4912-9a86-063cbfc5bc54"}], "plot_width": 600, "extra_y_ranges": {}, "extra_x_ranges": {}, "tool_events": {"type": "ToolEvents", "id": "09a8bda0-3993-40b6-bc39-ce27ef7a5ad0"}, "plot_height": 400, "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158", "y_range": {"type": "Range1d", "id": "cb42c7f5-be85-4c92-8b6e-567ba920072d"}, "below": [{"type": "LinearAxis", "id": "42649b9f-92f8-465b-9e1a-537070a8f1ae"}], "left": [{"type": "LinearAxis", "id": "39364f7a-043c-4959-abd6-416b9d9d1135"}]}}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "9820e3dc-93f6-41ee-8cad-249e15059750"}, "type": "ResizeTool", "id": "9820e3dc-93f6-41ee-8cad-249e15059750"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "9162482b-9736-4d3d-b9d9-fb32cbf4f1c4"}, "type": "HelpTool", "id": "9162482b-9736-4d3d-b9d9-fb32cbf4f1c4"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "axis_label": null, "formatter": {"type": "BasicTickFormatter", "id": "fc456453-7d59-4af2-8a82-5e38c7cf525c"}, "ticker": {"type": "BasicTicker", "id": "b973eba3-3fa8-469c-b8ff-9ac1cacc33e4"}, "id": "42649b9f-92f8-465b-9e1a-537070a8f1ae"}, "type": "LinearAxis", "id": "42649b9f-92f8-465b-9e1a-537070a8f1ae"}, {"attributes": {"column_names": ["y_jython", "x", "y_python", "y_pypy"], "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "selected": {"2d": {"indices": []}, "1d": {"indices": []}, "0d": {"indices": [], "flag": false}}, "callback": null, "data": {"y_jython": [22, 43, 10, 25, 26, 101, 114, 203, 194, 215, 201, 227, 139, 160], "x": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], "y_python": [2, 3, 7, 5, 26, 221, 44, 233, 254, 265, 266, 267, 120, 111], "y_pypy": [12, 33, 47, 15, 126, 121, 144, 233, 254, 225, 226, 267, 110, 130]}, "id": "7c504fa7-7a7e-4c7b-92d4-aed1090cce0f"}, "type": "ColumnDataSource", "id": "7c504fa7-7a7e-4c7b-92d4-aed1090cce0f"}, {"attributes": {"line_color": {"value": "#5ab738"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "y": {"field": "y_jython"}, "x": {"field": "x"}, "id": "0fb996dc-d911-4203-8af1-1a28cc0fbf0c"}, "type": "Line", "id": "0fb996dc-d911-4203-8af1-1a28cc0fbf0c"}, {"attributes": {"geometries": [], "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "09a8bda0-3993-40b6-bc39-ce27ef7a5ad0"}, "type": "ToolEvents", "id": "09a8bda0-3993-40b6-bc39-ce27ef7a5ad0"}, {"attributes": {"tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "486d7356-4245-420c-bf44-c60417dd26d2", "children": [{"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}]}, "type": "PlotContext", "id": "486d7356-4245-420c-bf44-c60417dd26d2"}, {"attributes": {"tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "mantissas": [2, 5, 10], "id": "b973eba3-3fa8-469c-b8ff-9ac1cacc33e4"}, "type": "BasicTicker", "id": "b973eba3-3fa8-469c-b8ff-9ac1cacc33e4"}, {"attributes": {"line_color": {"value": "#f22c40"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "y": {"field": "y_python"}, "x": {"field": "x"}, "id": "1d1d82c5-7f08-4492-af3d-045e13b1cb99"}, "type": "Line", "id": "1d1d82c5-7f08-4492-af3d-045e13b1cb99"}, {"attributes": {"end": 293.5, "callback": null, "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "tags": [], "start": -24.5, "id": "cb42c7f5-be85-4c92-8b6e-567ba920072d"}, "type": "Range1d", "id": "cb42c7f5-be85-4c92-8b6e-567ba920072d"}, {"attributes": {"doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "1fda0f75-5d45-4e7d-8c72-bc7e284d1e90", "tags": []}, "type": "BasicTickFormatter", "id": "1fda0f75-5d45-4e7d-8c72-bc7e284d1e90"}, {"attributes": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "7c504fa7-7a7e-4c7b-92d4-aed1090cce0f"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "selection_glyph": null, "id": "5991c41a-f165-4fc0-b912-7dff7182b964", "glyph": {"type": "Line", "id": "1d1d82c5-7f08-4492-af3d-045e13b1cb99"}}, "type": "GlyphRenderer", "id": "5991c41a-f165-4fc0-b912-7dff7182b964"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "dimensions": ["width", "height"], "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "150ebe0f-737f-4ae4-a314-b4a28c9a3dae"}, "type": "WheelZoomTool", "id": "150ebe0f-737f-4ae4-a314-b4a28c9a3dae"}, {"attributes": {"nonselection_glyph": null, "data_source": {"type": "ColumnDataSource", "id": "7c504fa7-7a7e-4c7b-92d4-aed1090cce0f"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "selection_glyph": null, "id": "7917ff0c-49a2-4898-916f-9ac8e7e0a6a6", "glyph": {"type": "Line", "id": "0c9f262e-f0b4-4c9d-b062-a6aa26c1f3d1"}}, "type": "GlyphRenderer", "id": "7917ff0c-49a2-4898-916f-9ac8e7e0a6a6"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "dimensions": ["width", "height"], "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "e52ec4c6-956b-4ea7-acb0-7a493b7d2e37"}, "type": "BoxZoomTool", "id": "e52ec4c6-956b-4ea7-acb0-7a493b7d2e37"}, {"attributes": {"line_color": {"value": "#407ee7"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "y": {"field": "y_pypy"}, "x": {"field": "x"}, "id": "0c9f262e-f0b4-4c9d-b062-a6aa26c1f3d1"}, "type": "Line", "id": "0c9f262e-f0b4-4c9d-b062-a6aa26c1f3d1"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "dimension": 0, "ticker": {"type": "BasicTicker", "id": "b973eba3-3fa8-469c-b8ff-9ac1cacc33e4"}, "id": "dd500b40-5991-45b7-b640-0021f377da9d"}, "type": "Grid", "id": "dd500b40-5991-45b7-b640-0021f377da9d"}, {"attributes": {"plot": {"subtype": "Chart", "type": "Plot", "id": "4a8765b2-0e94-4d06-98df-b39e1860f158"}, "tags": [], "doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "axis_label": "measures", "formatter": {"type": "BasicTickFormatter", "id": "1fda0f75-5d45-4e7d-8c72-bc7e284d1e90"}, "ticker": {"type": "BasicTicker", "id": "0d2e7f2d-0583-41a1-bb01-3002662d0e2f"}, "id": "39364f7a-043c-4959-abd6-416b9d9d1135"}, "type": "LinearAxis", "id": "39364f7a-043c-4959-abd6-416b9d9d1135"}, {"attributes": {"doc": "b71c7128-02b2-4d85-94b0-bc7c5344e282", "id": "fc456453-7d59-4af2-8a82-5e38c7cf525c", "tags": []}, "type": "BasicTickFormatter", "id": "fc456453-7d59-4af2-8a82-5e38c7cf525c"}];
Bokeh.load_models(all_models);
var plots = [{'modeltype': 'PlotContext', 'elementid': '#494d8611-a76b-40b5-9150-d6df367e674c', 'modelid': '486d7356-4245-420c-bf44-c60417dd26d2'}];
for (idx in plots) {
var plot = plots[idx];
var model = Bokeh.Collections(plot.modeltype).get(plot.modelid);
Bokeh.logger.info('Realizing plot:')
Bokeh.logger.info(' - modeltype: ' + plot.modeltype);
Bokeh.logger.info(' - modelid: ' + plot.modelid);
Bokeh.logger.info(' - elementid: ' + plot.elementid);
var view = new model.default_view({
model: model,
el: plot.elementid
});
Bokeh.index[plot.modelid] = view;
}
});
</script>
</head>
<body>
<div class="plotdiv" id="494d8611-a76b-40b5-9150-d6df367e674c"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment