Created
February 23, 2015 12:58
-
-
Save milktrader/f13a1af18a594b110656 to your computer and use it in GitHub Desktop.
Bokeh.jl simple plot code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="/Users/Administrator/.julia/v0.4/Bokeh/deps/bokehjs/css/bokeh.min.css" type="text/css" /> | |
<script type="text/javascript" src="/Users/Administrator/.julia/v0.4/Bokeh/deps/bokehjs/js/bokeh.min.js"></script> | |
<script type="text/javascript"> | |
$(function() { | |
var modelid = "e4aa998b-b915-4d5c-aa38-4d76437c4fbf"; | |
var modeltype = "PlotContext"; | |
var elementid = "efeda321-3384-4112-bf16-22b0c86b0601"; | |
console.log(" modeltype:", modeltype); | |
console.log(" modelid:", modelid); | |
console.log(" elementid:", elementid); | |
var all_models = [{"attributes":{"selected":[],"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","cont_ranges":{},"id":"0584bb01-325e-4398-84ef-1dfcffaa9b30","column_names":["x","y"],"data":{"x":[1,2,3,4,5],"y":[1,2,3,4,5]},"discrete_ranges":{}},"id":"0584bb01-325e-4398-84ef-1dfcffaa9b30","type":"Bokeh.Bokehjs.ColumnDataSource"},{"attributes":{"server_data_source":null,"ydata_range":null,"xdata_range":null,"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"582f845c-a920-46d2-933c-7c43b954744e","glyphspec":{"line_color":{"value":"blue"},"x":{"units":"data","field":"x"},"type":"line","y":{"units":"data","field":"y"}},"data_source":{"id":"0584bb01-325e-4398-84ef-1dfcffaa9b30","type":"Bokeh.Bokehjs.ColumnDataSource"}},"id":"582f845c-a920-46d2-933c-7c43b954744e","type":"Bokeh.Bokehjs.Glyph"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"18c4d41f-5bfb-4434-a25c-7e88bc638133","sources":[{"source":{"id":"0584bb01-325e-4398-84ef-1dfcffaa9b30","type":"Bokeh.Bokehjs.ColumnDataSource"},"columns":["x"]}]},"id":"18c4d41f-5bfb-4434-a25c-7e88bc638133","type":"Bokeh.Bokehjs.DataRange1d"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"9a095d1c-222c-4da1-8f36-10782a89c491","sources":[{"source":{"id":"0584bb01-325e-4398-84ef-1dfcffaa9b30","type":"Bokeh.Bokehjs.ColumnDataSource"},"columns":["y"]}]},"id":"9a095d1c-222c-4da1-8f36-10782a89c491","type":"Bokeh.Bokehjs.DataRange1d"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"f11dc74c-e964-4e40-aec1-fd49a69a3647"},"id":"f11dc74c-e964-4e40-aec1-fd49a69a3647","type":"Bokeh.Bokehjs.BasicTicker"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"9449b73a-5f99-4be2-934e-e5f6b2d9339c"},"id":"9449b73a-5f99-4be2-934e-e5f6b2d9339c","type":"Bokeh.Bokehjs.BasicTicker"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"ecaaec5a-7807-4571-acd4-6d18d934a49c"},"id":"ecaaec5a-7807-4571-acd4-6d18d934a49c","type":"Bokeh.Bokehjs.BasicTickFormatter"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"dc5480af-c756-4808-a4e7-4c304f004a40"},"id":"dc5480af-c756-4808-a4e7-4c304f004a40","type":"Bokeh.Bokehjs.BasicTickFormatter"},{"attributes":{"location":"min","ticker":{"id":"f11dc74c-e964-4e40-aec1-fd49a69a3647","type":"Bokeh.Bokehjs.BasicTicker"},"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"07549959-fc2c-45a9-91a8-a23d03951163","dimension":0,"formatter":{"id":"ecaaec5a-7807-4571-acd4-6d18d934a49c","type":"Bokeh.Bokehjs.BasicTickFormatter"},"bounds":"auto"},"id":"07549959-fc2c-45a9-91a8-a23d03951163","type":"Bokeh.Bokehjs.LinearAxis"},{"attributes":{"location":"min","ticker":{"id":"9449b73a-5f99-4be2-934e-e5f6b2d9339c","type":"Bokeh.Bokehjs.BasicTicker"},"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"ae529072-c722-4a17-b54a-62f66e8299b3","dimension":1,"formatter":{"id":"dc5480af-c756-4808-a4e7-4c304f004a40","type":"Bokeh.Bokehjs.BasicTickFormatter"},"bounds":"auto"},"id":"ae529072-c722-4a17-b54a-62f66e8299b3","type":"Bokeh.Bokehjs.LinearAxis"},{"attributes":{"axis":{"id":"07549959-fc2c-45a9-91a8-a23d03951163","type":"Bokeh.Bokehjs.LinearAxis"},"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"37df52fc-1155-4e00-86ff-95c83911926a","dimension":0},"id":"37df52fc-1155-4e00-86ff-95c83911926a","type":"Bokeh.Bokehjs.Grid"},{"attributes":{"axis":{"id":"ae529072-c722-4a17-b54a-62f66e8299b3","type":"Bokeh.Bokehjs.LinearAxis"},"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"023610f7-c9a7-4958-a998-f66128360185","dimension":1},"id":"023610f7-c9a7-4958-a998-f66128360185","type":"Bokeh.Bokehjs.Grid"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"4f998eaf-c0d9-44e8-b31f-44fe82d18a24","dimensions":["width","height"]},"id":"4f998eaf-c0d9-44e8-b31f-44fe82d18a24","type":"PanTool"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"c6cb40af-c0a5-4455-bf25-990b4734da48","dimensions":["width","height"]},"id":"c6cb40af-c0a5-4455-bf25-990b4734da48","type":"WheelZoomTool"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"20dd9169-b379-4b42-8b60-d39c450f8492","dimensions":null},"id":"20dd9169-b379-4b42-8b60-d39c450f8492","type":"BoxZoomTool"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"37c779b4-2c9a-41e8-9d41-d3e3c1c617fe","dimensions":null},"id":"37c779b4-2c9a-41e8-9d41-d3e3c1c617fe","type":"ResizeTool"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","plot":{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},"id":"73370d3b-f7a0-40be-9d54-1df28d92774f","dimensions":null},"id":"73370d3b-f7a0-40be-9d54-1df28d92774f","type":"ResetTool"},{"attributes":{"canvas_height":600,"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","data_sources":[],"canvas_width":800,"tools":[{"id":"4f998eaf-c0d9-44e8-b31f-44fe82d18a24","type":"PanTool"},{"id":"c6cb40af-c0a5-4455-bf25-990b4734da48","type":"WheelZoomTool"},{"id":"20dd9169-b379-4b42-8b60-d39c450f8492","type":"BoxZoomTool"},{"id":"37c779b4-2c9a-41e8-9d41-d3e3c1c617fe","type":"ResizeTool"},{"id":"73370d3b-f7a0-40be-9d54-1df28d92774f","type":"ResetTool"}],"outer_height":600,"renderers":[{"id":"07549959-fc2c-45a9-91a8-a23d03951163","type":"Bokeh.Bokehjs.LinearAxis"},{"id":"ae529072-c722-4a17-b54a-62f66e8299b3","type":"Bokeh.Bokehjs.LinearAxis"},{"id":"37df52fc-1155-4e00-86ff-95c83911926a","type":"Bokeh.Bokehjs.Grid"},{"id":"023610f7-c9a7-4958-a998-f66128360185","type":"Bokeh.Bokehjs.Grid"},{"id":"582f845c-a920-46d2-933c-7c43b954744e","type":"Bokeh.Bokehjs.Glyph"}],"x_range":{"id":"18c4d41f-5bfb-4434-a25c-7e88bc638133","type":"Bokeh.Bokehjs.DataRange1d"},"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","y_range":{"id":"9a095d1c-222c-4da1-8f36-10782a89c491","type":"Bokeh.Bokehjs.DataRange1d"},"outer_width":800,"title":"Bokeh Plot"},"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"},{"attributes":{"doc":"2da222a9-34ab-4095-8ecc-eda9f6dec4bb","id":"e4aa998b-b915-4d5c-aa38-4d76437c4fbf","children":[{"id":"3fb79763-90a5-4f1c-9847-4042d7bab1b7","type":"Bokeh.Bokehjs.Plot"}]},"id":"e4aa998b-b915-4d5c-aa38-4d76437c4fbf","type":"Bokeh.Bokehjs.PlotContext"}]; | |
Bokeh.load_models(all_models); | |
var model = Bokeh.Collections(modeltype).get(modelid); | |
var view = new model.default_view({model: model, el: "#efeda321-3384-4112-bf16-22b0c86b0601"}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div class="plotdiv" id="efeda321-3384-4112-bf16-22b0c86b0601"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment