Bokeh example: weather plot cannot update in Jupyter notebook

Hello,

New to Bokeh. I tried to run Bokeh example: https://github.com/bokeh/bokeh/tree/master/examples/app/weather using Jupyter notebook. I added few lines related to notebook

from bokeh.io import curdoc, output_notebook, push_notebook

from bokeh.plotting import figure, show

output_notebook()

and

handle = show(row(plot, controls),notebook_handle=True)

push_notebook(handle=handle)

Everything works fine, but the plot does not update when I click the graphic column to change Austin to Boston.

I am not sure where the function : update_plot, is being called to update. Any help will be appreciated.

Thanks,

Wanli Wu

That example is a bokeh server example. It has to be run using a Bokeh server (that is where the callbacks actually get executed). E.g. by executing

  bokeh serve --show weather

in a command shell It will not work as-is in the notebook. There is a preliminary, proof-of-concept for embedding Bokeh server apps in notebooks here:

  https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/notebook_embed.ipynb

That approach does have issues (described in the notebook). A full robust and supported solution for embedding Bokeh apps in notebooks will be in the 0.12.5 release.

Thanks,

Bryan

···

On Jan 19, 2017, at 12:47 PM, [email protected] wrote:

Hello,

New to Bokeh. I tried to run Bokeh example: https://github.com/bokeh/bokeh/tree/master/examples/app/weather using Jupyter notebook. I added few lines related to notebook

from bokeh.io import curdoc, output_notebook, push_notebook
from bokeh.plotting import figure, show

output_notebook()

and

handle = show(row(plot, controls),notebook_handle=True)
push_notebook(handle=handle)

Everything works fine, but the plot does not update when I click the graphic column to change Austin to Boston.

I am not sure where the function : update_plot, is being called to update. Any help will be appreciated.

Thanks,

Wanli Wu

--
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].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/377ae7e7-eb6b-4aba-b978-3a3add52124e%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Bryan,

Thank you very much. It’s good to know the current issue in notebook, and look forward to the next release of Bokeh. – Wanli

···

On Thursday, January 19, 2017 at 11:50:52 AM UTC-7, Bryan Van de ven wrote:

That example is a bokeh server example. It has to be run using a Bokeh server (that is where the callbacks actually get executed). E.g. by executing

    bokeh serve --show weather

in a command shell It will not work as-is in the notebook. There is a preliminary, proof-of-concept for embedding Bokeh server apps in notebooks here:

    [https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/notebook_embed.ipynb](https://github.com/bokeh/bokeh/blob/master/examples/howto/server_embed/notebook_embed.ipynb)

That approach does have issues (described in the notebook). A full robust and supported solution for embedding Bokeh apps in notebooks will be in the 0.12.5 release.

Thanks,

Bryan

On Jan 19, 2017, at 12:47 PM, [email protected] wrote:

Hello,

New to Bokeh. I tried to run Bokeh example: https://github.com/bokeh/bokeh/tree/master/examples/app/weather using Jupyter notebook. I added few lines related to notebook

from bokeh.io import curdoc, output_notebook, push_notebook

from bokeh.plotting import figure, show

output_notebook()

and

handle = show(row(plot, controls),notebook_handle=True)

push_notebook(handle=handle)

Everything works fine, but the plot does not update when I click the graphic column to change Austin to Boston.

I am not sure where the function : update_plot, is being called to update. Any help will be appreciated.

Thanks,

Wanli Wu


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].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/377ae7e7-eb6b-4aba-b978-3a3add52124e%40continuum.io.

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