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

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.

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

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, [email protected] 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 [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/02cf4966-dd3c-4bc0-815e-e293026abaef%40continuum.io.

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