New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bokeh plot in jupyter slides not rendered corretly #4859
Comments
ping @damianavila do you have any insights or comments? |
I ca reproduce it, not sure why is failing yet. It is probably a confilct between reveal.js and bokeh... but I need to investigate further. |
@luoq @damianavila any updates on this? |
We should probably test with latest Bokeh and latest nbconvert to see if the issue persist. |
This issue persists for bokeh 0.12.5 |
+1 I have this problem when I try to export to pdf with nbconvert 5.1.1 and bokeh 12.5. The pdf gets generated but all of the plots are left out. |
I can't reproduce this problem with a notebook saved with Bokeh
and I also get output (with plots) using
Is there a failing notebook available someone can share? |
@bryevdv you can try the zip file in first comment |
the plain HTML works, the slides do not. Presumably because that notebook has sub-slides and mine didn't actually have real slide cells define. Looking at the JS console, the proximate cause is clear: BokehJS is not getting loaded at all, which can also be confirmed by looking at the "sources" tab in the browser debug window. Unfortunately I have no idea why this would or could be, and probably won't be able to do much or anything about it without help from either the reveal or notebook folks. ping @damianavila |
I will say, just to be clear, we don't currently and have not ever made any guarantees except for: in a running notebook, and in a plain HTML static rendered notebook. Obviously I'd love for things to work with reveal but if reveal and Bokeh don't work together that just may have to be noted as a known incompatibility. |
I just came across the same issue having reveal.js not showing bokeh plots in the slide show which is sad considering the great functionality that bokeh, reveal and jupyter provide in combination for interactive data visualization (thanks to all of you guys - I really appreciate it!). Fix via added bokeh.js importFollowing @bryevdv comment about This causes the bokeh plots to show up again. It indicates that the issue is somehow related to how bokeh.js is loaded/imported. Fix via slide type within JupyterAfter experimenting with the slide types of the jupyter notebook, I figured that the key is to not skip In order to hide Test materialFor convenience, I added a zip with a working and non working version based on @luoq example notebooks. EnvironmentI tested this with bokeh 0.12.5 and 0.12.6 with python 3.5.2 under ubuntu 16.4. with the newest jupyter and ipython packages. |
@mansenfranzen This is incredibly valuable information, thank you very much for taking the time to investigate and write things up. It had escaped my notice that Perhaps there is some other mechanism we can use to perform the work but otherwise hide the call, @damianavila any suggestions? Otherwise we can use this issue as a task to include this information in the documentation more prominently. |
I think documentation is the key here... if you skip a cell and try to convert to html or slides, that specific cell and the output of that cell (containing the bokeh.js) is not "passed" to the final output, preventing the correct loading of the bokeh plots. Putting |
I added a new section to the notebook chapter of the user's guide in 33d11cb This issue will automatically close when that PR is merged. @damianavila if there is something more/better to say than what I have added in that commit please let me know. |
LGTM as is. |
bokeh export bug.zip
The plot in slides generated by following command ('bokeh export bug.slides.html') is not rendered correctly.
It should behave like 'bokeh export bug.html' generated by
bokeh info:
Python version : 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 2 2016, 17:53:06)
IPython version : 4.2.0
Bokeh version : 0.12.0
BokehJS static path : /home/lq/.local/anaconda3/lib/python3.5/site-packages/bokeh/server/static
The text was updated successfully, but these errors were encountered: