☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Viewing Bokeh plots in online Jupyter Notebooks

Community Support
Olavur_Mortensen
Olavur_Mortensen

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

​

⌁   Link to post
Bryan
Bryan

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:

  Jupyter Notebook Viewer

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.

Thanks,

Bryan

···

On Dec 22, 2016, at 7:06 AM, olavurmortensen@gmail.com wrote:

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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ef30a1ee-a334-422a-8423-b15c61dbe47c%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Olavur_Mortensen
Olavur_Mortensen

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:

    [http://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/master/index.ipynb](http://nbviewer.jupyter.org/github/bokeh/bokeh-notebooks/blob/master/index.ipynb)

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.

Thanks,

Bryan

On Dec 22, 2016, at 7:06 AM, olavurm...@gmail.com wrote:

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 bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ef30a1ee-a334-422a-8423-b15c61dbe47c%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled