Closed milktrader closed 9 years ago
I've just successfully installed bokeh for python and it renders its example fine in Safari.
Humm, very odd, I've just tried on my mac and plots are rendering fine, but I'm on 0.3.6
. That said the tests with latest are running fine.
Things to try:
showplot()
?Just to be clear, to plot a very simple example, in Julia:
using Bokeh
plot(1:5)
showplot()
Should open your default browser and show the plot.
ps. This isn't the first issue in the repo so perhaps you were looking at the wrong one previously?
Yeah I'm not sure why I didn't see Issues button before. Sorry for the noise about that.
I'll troubleshoot on my end for a while ...
By way of elimination,
The Bokeh.jl example opens fine in Safari
Safari opens with call to showplot()
, but the screen is blank
humm that's very weird, the only change to the code since I generated the examples was to upgrade bokehjs to v0.7.1
which is the version used in Bokeh v0.8.0.
Perhaps @bryevdv would have some insight from the javascript end?
The only think I can suggest at present is to upgrade Safari, my mac is running v7.1.2
I think, I've done nothing special to it just running latest OSX and clicked "yes" whenever updates have been offered.
Here is the html output for the simple example above, which seems a little sparse
<!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>
I've got two files that sound important highlighted in red and whose contents is empty.
Looks like the problem is that the paths of bokeh.js
and bokeh.css
are wrong. It should be
bokehjs/bokeh.min.js not bokehjs/js/bokeh.min.js
The question is how is that happening, the latest code clearly doesn't add the "/js/" or "/css/": https://github.com/bokeh/Bokeh.jl/blob/master/src/generate.jl#L155
I previously tried removing and then re-adding via the Pkg.rm
and Pkg.add
methods. Doing a nuke of the Bokeh repo manually ... and problem solved!
Great must have been a problem with the install.
I can only speculate what went wrong, but possibly installing the bokeh engine after adding the package mucked things up. Possibly a documentation note to make sure you have bokeh installed and operating properly before adding the Julia bindings provided in Bokeh.jl
In any case, this technology is impressive. We now have plotly and bokeh to add to the Gadfly and Winston offerings.
Normal "Bokeh.py" is not required for Bokeh.jl to work. As you will see the path to bokeh.js
in the plot's html file is inside the Bokeh.jl install. That's the only git of the main package used.
It more likely to be because you had Bokeh.jl pinned at a previous commit until you deleted it.
Okay, good clarification. I suspected I did not need to have Bokeh.py
installed.
Finally, plotting time series for free!
using MarketData
plot(cl.timestamp, cl.values, title="Apple Closing Prices")
showplot()
Package installed without warnings (except for some deprecation warnings)
Safari
Version 7.0.6 (9537.78.2)
The documentation said nothing of independently building the bokeh tar file, but I'm wondering if that's the issue.