☰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

How to push updates to a plot embedded using bokeh.embed.components?

Community Support
Paul
Paul

When a plot is displayed using show(plot, notebook_handle=True) then the subsequent updates are easily initiated using push_notebook(handle=plot_handle).

How can I push updates to a plot generated from bokeh.embed.components? There must be a way to obtain a comm handle for that plot…

Thank you.

⌁   Link to post
Bryan
Bryan

Hi,

Just to be clear, you are using components to embed a plot in some HTML inside a notebook, in an output cell? There's not a way to use components to do what you are asking, since there are extra bits required to set up comms that those templates do not know anything about. But, there is a "notebook_div" template that you could use, and embed the results of that in your HTML instead. Basically, you would want to imitate these few lines of code yourself:

  https://github.com/bokeh/bokeh/blob/master/bokeh/io.py#L334-L341

Thanks,

Bryan

···

On Jan 25, 2017, at 8:51 AM, rootsumsquared@gmail.com wrote:

When a plot is displayed using show(plot, notebook_handle=True) then the subsequent updates are easily initiated using push_notebook(handle=plot_handle).

How can I push updates to a plot generated from bokeh.embed.components? There must be a way to obtain a comm handle for that plot...

Thank you.

--
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/02cf4966-dd3c-4bc0-815e-e293026abaef%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Paul
Paul

Thank you. Investigating. This used to be a walk in the park when updates could be pushed from the source :slight_smile:
http://bokeh.pydata.org/en/0.10.0/docs/reference/models/sources.html#bokeh.models.sources.ColumnDataSource.push_notebook

···

On Wednesday, January 25, 2017 at 3:52:26 PM UTC, Bryan Van de ven wrote:

Hi,

Just to be clear, you are using components to embed a plot in some HTML inside a notebook, in an output cell? There’s not a way to use components to do what you are asking, since there are extra bits required to set up comms that those templates do not know anything about. But, there is a “notebook_div” template that you could use, and embed the results of that in your HTML instead. Basically, you would want to imitate these few lines of code yourself:

    [https://github.com/bokeh/bokeh/blob/master/bokeh/io.py#L334-L341](https://github.com/bokeh/bokeh/blob/master/bokeh/io.py#L334-L341)

Thanks,

Bryan

On Jan 25, 2017, at 8:51 AM, rootsum...@gmail.com wrote:

When a plot is displayed using show(plot, notebook_handle=True) then the subsequent updates are easily initiated using push_notebook(handle=plot_handle).

How can I push updates to a plot generated from bokeh.embed.components? There must be a way to obtain a comm handle for that plot…

Thank you.

–
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/02cf4966-dd3c-4bc0-815e-e293026abaef%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