Search code examples
jupyter-notebookbokehreveal.jsholoviewsrise

Holoviews (Bokeh) with reveal.js


I have a presentation with Holoviews (Bokeh) interactive plots. The presentation works fine with rise (inside the notebook), but when I convert it to slides with reveal.js (v3.6.0) locally, the output doesn't show up. Even post serving through the CDN doesn't fix the issue. Anyone encountered this before?


Solution

  • I raised an issue on the RISE site about this problem once I was able to reproduce it, and the RISE author pointed me to this issue on the Bokeh site that let me get it working in my case. The solution is simply not to tell RISE to skip the cell that contains hv.extension("bokeh"). That cell loads BokehJS, which is needed for any Bokeh-based plots to show up, and skipping it works fine for a live presentation but apparently not for any exported version. After telling RISE not to skip that cell, my example notebook now works fine when converted to .html using jupyter nbconvert --to slides Bednar_INDEX_2018.ipynb, and it can be converted to PDF as described in the RISE documentation. The PDF output isn't formatted perfectly, but the plots do all show up at least.