Reputation: 5555
I am using bokeh to generate a plot and save to a disk and then show it on the browser. A new page will open in the browser and then nothing is display on the screen except the title of that page.
Here is the code I wrote:
from bokeh.plotting import figure, show, output_file
p = figure(title="Basic Title", plot_width=300, plot_height=300)
p.circle([1,2], [3,4])
output_file("test.html")
show(p)
Upvotes: 1
Views: 1692
Reputation: 34568
You are evidently running of Bokeh installed from GitHub source. In this case you must use "inline" resources. CDN resources are only published for full releases, release candidates, and "dev" builds. We do not publish CDN resources for every commit, so there will never be versions like dev13+2.<hash>.min.js
available on CDN.
An easy way to use inline resources is to set the BOKEH_RESOURCES
environment variable:
BOKEH_RESOURCES=inline python myscript.py
Of course the other alternative is to install a real release instead of installing from source.
Upvotes: 2
Reputation: 2326
As Chrome developer console mentions, your test.html
file fails at fetching resources (Bokeh CSS and JS files). The version of Bokeh you use is probably the culprit here.
Try reinstalling Bokeh with pip install bokeh
and it should work.
Otherwise, if you don't want or cannot reinstall it, you can manually edit your HTML file so that it points to the correct resources:
https://cdn.bokeh.org/bokeh/release/bokeh-0.12.5.min.css
for the CSShttps://cdn.bokeh.org/bokeh/release/bokeh-0.12.5.min.js
for the JSUpvotes: 1