Continuous Updating.ipynb does not update

Hey I want to write a notebook for plotting some info that is live updated on the server. I found the following example: bokeh/Continuous Updating.ipynb at main · bokeh/bokeh · GitHub

This looks perfect! Except it doesn’t appear to work. What I did:

pip install jupyterlab bokeh

Then I open the downloaded notebook. I run the first few cells, a plot appears with some random circles.
Then I run the cell with the endless loop that appears to push new data to the plot, but the plot does not update at all. Only when I interrupt and then rerun the plotting cell does it update the plot with the new title and scaled circles.

So how can I actually have a continuously updating plot?

Okay, problem solved. In a classic notebook it works fine, but in jupyter lab it does not.
Turns out you have to install a seperate jupyter_bokeh extension to make it work.
This is actually documented in Using with Jupyter — Bokeh 2.4.2 Documentation

For funsies I also tried VS Code but that did not work, but whatever.

Correct, the Jupyter project made changes on their end that make requiring an extension unavoidable. Note that you can also embed full Bokeh server applications:

bokeh/notebook_embed.ipynb at branch-3.0 · bokeh/bokeh · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.