question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cells which create bokeh plots do not get saved

See original GitHub issue

I’ve encountered an issue where all cells which produce a bokeh plot in Jupyter Lab do not get saved.

Versions

$ jupyter labextension list
JupyterLab v0.31.8
Known labextensions:
   app dir: /opt/conda/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager
        @jupyter-widgets/jupyterlab-manager v0.33.2  enabled  OK
@jupyterlab/hub-extension
        @jupyterlab/hub-extension v0.8.1  enabled  OK
jupyterlab_bokeh
        jupyterlab_bokeh v0.4.0  enabled  OK

Reproducing

  • Create a new notebook
  • Create a cell with the following code
from bokeh.io import show, output_notebook
from bokeh.models import ColumnDataSource
from bokeh.plotting import figure
from bokeh.sampledata.commits import data
from bokeh.transform import jitter

output_notebook()

DAYS = ['Sun', 'Sat', 'Fri', 'Thu', 'Wed', 'Tue', 'Mon']

source = ColumnDataSource(data)

p = figure(plot_width=800, plot_height=300, y_range=DAYS, x_axis_type='datetime',
           title="Commits by Time of Day (US/Central) 2012-2016")

p.circle(x='time', y=jitter('day', width=0.6, range=p.y_range),  source=source, alpha=0.3)

p.xaxis[0].formatter.days = ['%Hh']
p.x_range.range_padding = 0
p.ygrid.grid_line_color = None

show(p)
  • Save the notebook
  • Restart Jupyter Lab
  • Open the notebook
  • The cell is missing

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:19 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
canavandlcommented, Apr 19, 2018

@jacobtomlinson @tjcrone

This issue was resolved in #34 and a new jupyterlab_bokeh=0.4.1 lab extension has been published. Please open a new issue if there are still problems.

2reactions
jacobtomlinsoncommented, Mar 12, 2018

Further investigation shows that if I then import and run output_notebook() again in a new cell and then close and reopen the notebook the missing cell reappears.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cells which create bokeh plots do not get saved #29 - GitHub
I've encountered an issue where all cells which produce a bokeh plot in Jupyter Lab do not get saved. Versions $ jupyter labextension...
Read more >
python bokeh plotting package does not cache plots in jupyter ...
Running this plot works just fine. But when I saved the notebook, closed it, and reopened it, the plot would not show up...
Read more >
bokeh.io — Bokeh 3.0.3 Documentation
Update Bokeh plots in a Jupyter notebook output cells with new data or property values. When working the the notebook, the show function...
Read more >
Python Guide: Bokeh Cheat Sheet - Pluralsight
In this cheat sheet, we will learn the basics of creating plots with the help of Bokeh's ... Specifying how and where the...
Read more >
Interactive Visualization with Bokeh - The Data Frog
do basic plots; create an interactive plotting system with a user interface (featuring a button!) And all the plotting will be done in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found