Reputation: 793
I was using Bokeh lib just fine until one day I switched to Anaconda distribution.
from bokeh.charts import Bar, output_file, show, output_notebook
# prepare some data
data = {"y": [6, 7, 2, 4, 5], "z": [1, 5, 12, 4, 2]}
# output to static HTML file
output_file("bar.html")
# create a new line chat with a title and axis labels
p = Bar(data, cat=['C1', 'C2', 'C3', 'D1', 'D2'], title="Bar example",
xlabel='categories', ylabel='values', width=400, height=400)
output_notebook()
# show the results
show(p)
ERROR:C:\Users\paul.dong\Documents\Apps\Anaconda\lib\site-packages\bokeh\validation\check.pyc:W-1003 (MALFORMED_CATEGORY_LABEL): Category labels are malformed: [field:caty] [first_value: C1:0.333333333333] [renderer: GlyphRenderer, ViewModel:GlyphRenderer, ref _id: e732fc67-f26f-48a1-ac50-dcf2ab0b0fd7]
ERROR:C:\Users\paul.dong\Documents\Apps\Anaconda\lib\site-packages\bokeh\validation\check.pyc:W-1003 (MALFORMED_CATEGORY_LABEL): Category labels are malformed: [field:catz] [first_value: C1:0.666666666667] [renderer: GlyphRenderer, ViewModel:GlyphRenderer, ref _id: 9737b7cd-c909-47eb-8c05-a8160b0ba23b]
So the html file output still normal, but the notebook output just won't show.
Appreciate your help.
Edit: I am using python 2.7 and bokeh 0.9.3 also jupyter v4
Upvotes: 0
Views: 322
Reputation: 793
Just to post the temporary solution here.
It turns out the charting interface of Bokeh is going thru some big changes and obviously the validating steps are a good sign (hence the error messages).
But for now, if try to incorporate bokeh chart into your notebook, just downgrade to a version where you last made it work. For me it is bokeh 0.9.2.
Upvotes: 0