widget with animated plot

Hi,
i would like to create an animated plot app in Bokeh with buttons for start/stop. Something like this: https://github.com/bokeh/bokeh/blob/master/examples/plotting/server/line_animate_widget.py. There is a function for checking widget:
cursession().poll_document(curdoc(), 0.05)

``

Is there any way to do it without “busy waiting”?
Thank you.

We are currently working on a completely new server based around a pure websocket protocol that will support this, but it will not be ready until later this year (hopefully November).

Bryan

···

On Oct 6, 2015, at 02:34, Michael Skotnica [email protected] wrote:

Hi,
i would like to create an animated plot app in Bokeh with buttons for start/stop. Something like this: https://github.com/bokeh/bokeh/blob/master/examples/plotting/server/line_animate_widget.py. There is a function for checking widget:
cursession().poll_document(curdoc(), 0.05)

``

Is there any way to do it without “busy waiting”?
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/31de2289-8c50-432e-9448-869f0d45ec08%40continuum.io.

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

I am running bokeh 0.11dev4 on Mac OS X 10.10.4. I downloaded line_animate_widget.py from the OP’s link, uncommented lines 88 & 93, started “bokeh serve” in one Terminal window, and then “python line_animate_widget.py” (Python 2.7.11 :: Anaconda 2.4.1 (x86_64)) in another Terminal window. A new tab opened up in my default browser (Safari) in which the plot is visible and the sinusoid is animated. However, I have the following issues:

  1. I get this error in the Terminal window in which I am running line_animate_widget.py:

    Traceback (most recent call last):

    File “line_animate_widget.py”, line 93, in
    cursession().poll_document(curdoc(), 0.05)
    NameError: name ‘cursession’ is not defined

  2. The start and stop buttons do not affect the animation–it just keeps on running.

Any suggestions for how to fix this?

Thanks,
Greg

···

On Tuesday, October 6, 2015 at 5:52:14 AM UTC-6, Bryan Van de ven wrote:

We are currently working on a completely new server based around a pure websocket protocol that will support this, but it will not be ready until later this year (hopefully November).

Bryan

On Oct 6, 2015, at 02:34, Michael Skotnica [email protected] wrote:

Hi,
i would like to create an animated plot app in Bokeh with buttons for start/stop. Something like this: https://github.com/bokeh/bokeh/blob/master/examples/plotting/server/line_animate_widget.py. There is a function for checking widget:
cursession().poll_document(curdoc(), 0.05)

``

Is there any way to do it without “busy waiting”?
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/31de2289-8c50-432e-9448-869f0d45ec08%40continuum.io.

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

This is a bug, fixed in an open PR:

  Periodic forcing and server examples cleanup by bryevdv · Pull Request #3330 · bokeh/bokeh · GitHub

Which will be merged to master soon (hopefully tomorrow)

Bryan

···

On Dec 20, 2015, at 1:17 AM, Greg Nordin <[email protected]> wrote:

I am running bokeh 0.11dev4 on Mac OS X 10.10.4. I downloaded line_animate_widget.py from the OP's link, uncommented lines 88 & 93, started "bokeh serve" in one Terminal window, and then "python line_animate_widget.py" (Python 2.7.11 :: Anaconda 2.4.1 (x86_64)) in another Terminal window. A new tab opened up in my default browser (Safari) in which the plot is visible and the sinusoid is animated. However, I have the following issues:

1. I get this error in the Terminal window in which I am running line_animate_widget.py:

    Traceback (most recent call last):

    File "line_animate_widget.py", line 93, in <module>
        cursession().poll_document(curdoc(), 0.05)
    NameError: name 'cursession' is not defined

2. The start and stop buttons do not affect the animation--it just keeps on running.

Any suggestions for how to fix this?

Thanks,
Greg

On Tuesday, October 6, 2015 at 5:52:14 AM UTC-6, Bryan Van de ven wrote:
We are currently working on a completely new server based around a pure websocket protocol that will support this, but it will not be ready until later this year (hopefully November).

Bryan

On Oct 6, 2015, at 02:34, Michael Skotnica <[email protected]> wrote:

Hi,
i would like to create an animated plot app in Bokeh with buttons for start/stop. Something like this: https://github.com/bokeh/bokeh/blob/master/examples/plotting/server/line_animate_widget.py\. There is a function for checking widget:
cursession().poll_document(curdoc(), 0.05)
Is there any way to do it without "busy waiting"?
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/31de2289-8c50-432e-9448-869f0d45ec08%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
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/6488b123-6b98-4791-a9b7-f47f3727982d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

That would be great! I am preparing materials for both a junior-level class and a graduate class I will be teaching at the start of the new semester in 2 weeks. I’m trying to rapidly learn Bokeh (I was in the webinar this past week) so I can transition to it from matplotlib for the in-class visualizations and illustrations I want to use. Being able to use the Bokeh animation capability is crucial to making the transition. I really appreciate your rapid feedback and help.

I assume once the open PR is merged I will need to pull the master branch and manually build everything, correct?

Greg

···

On Sunday, December 20, 2015 at 12:25:12 AM UTC-7, Bryan Van de ven wrote:

This is a bug, fixed in an open PR:

    [https://github.com/bokeh/bokeh/pull/3330](https://github.com/bokeh/bokeh/pull/3330)

Which will be merged to master soon (hopefully tomorrow)

Bryan

On Dec 20, 2015, at 1:17 AM, Greg Nordin [email protected] wrote:

I am running bokeh 0.11dev4 on Mac OS X 10.10.4. I downloaded line_animate_widget.py from the OP’s link, uncommented lines 88 & 93, started “bokeh serve” in one Terminal window, and then “python line_animate_widget.py” (Python 2.7.11 :: Anaconda 2.4.1 (x86_64)) in another Terminal window. A new tab opened up in my default browser (Safari) in which the plot is visible and the sinusoid is animated. However, I have the following issues:

  1. I get this error in the Terminal window in which I am running line_animate_widget.py:
Traceback (most recent call last):
File "line_animate_widget.py", line 93, in <module>
    cursession().poll_document(curdoc(), 0.05)
NameError: name 'cursession' is not defined
  1. The start and stop buttons do not affect the animation–it just keeps on running.

Any suggestions for how to fix this?

Thanks,

Greg

On Tuesday, October 6, 2015 at 5:52:14 AM UTC-6, Bryan Van de ven wrote:

We are currently working on a completely new server based around a pure websocket protocol that will support this, but it will not be ready until later this year (hopefully November).

Bryan

On Oct 6, 2015, at 02:34, Michael Skotnica [email protected] wrote:

Hi,

i would like to create an animated plot app in Bokeh with buttons for start/stop. Something like this: https://github.com/bokeh/bokeh/blob/master/examples/plotting/server/line_animate_widget.py. There is a function for checking widget:

cursession().poll_document(curdoc(), 0.05)

Is there any way to do it without “busy waiting”?

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/31de2289-8c50-432e-9448-869f0d45ec08%40continuum.io.

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


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/6488b123-6b98-4791-a9b7-f47f3727982d%40continuum.io.

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