Is it possible to have Bokeh render plots in Jupyter Notebooks without having to run them first?
For example, in this notebook on the Bokeh GitHub repo, you can’t see any of the plots, you have to run them first. I find this quite unfortunate, as often you don’t want people to download and run your notebook, you just want them to view it in a browser.
I suppose a workaround, if this is not possible, is to save the plot to a separate HTML file, upload it somewhere, and embed it directly into a markdown cell of the notebook.
In general, Bokeh works perfectly well in statically rendered Jupyter notebooks. You can see many example notebooks with inline Bokeh plots and widgets on nbviewer page for the bokeh-notebooks repo:
However, Bokeh specifically does *not* render on GitHub, because GitHub strips out all JavaScript code from all notebooks that they render. Bokeh plots are created by the BokehJS JavaScript library, so stripping out JavaScript means that Bokeh cannot function, full stop. I think it is unfortunate that GitHub does this, however it is also wholly outside of our control.
Is it possible to have Bokeh render plots in Jupyter Notebooks without having to run them first?
For example, in this notebook on the Bokeh GitHub repo, you can’t see any of the plots, you have to run them first. I find this quite unfortunate, as often you don’t want people to download and run your notebook, you just want them to view it in a browser.
I suppose a workaround, if this is not possible, is to save the plot to a separate HTML file, upload it somewhere, and embed it directly into a markdown cell of the notebook.
Ah, I see. Yes, that is very unfortunate. Thanks for the help.
···
On Thursday, December 22, 2016 at 2:25:49 PM UTC, Bryan Van de ven wrote:
Hi Ólavur,
In general, Bokeh works perfectly well in statically rendered Jupyter notebooks. You can see many example notebooks with inline Bokeh plots and widgets on nbviewer page for the bokeh-notebooks repo:
However, Bokeh specifically does not render on GitHub, because GitHub strips out all JavaScript code from all notebooks that they render. Bokeh plots are created by the BokehJS JavaScript library, so stripping out JavaScript means that Bokeh cannot function, full stop. I think it is unfortunate that GitHub does this, however it is also wholly outside of our control.
Is it possible to have Bokeh render plots in Jupyter Notebooks without having to run them first?
For example, in this notebook on the Bokeh GitHub repo, you can’t see any of the plots, you have to run them first. I find this quite unfortunate, as often you don’t want people to download and run your notebook, you just want them to view it in a browser.
I suppose a workaround, if this is not possible, is to save the plot to a separate HTML file, upload it somewhere, and embed it directly into a markdown cell of the notebook.
— Ólavur Mortensen
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].