Animation with ipywidgets

938 views
Skip to first unread message

quang....@gmail.com

unread,
Aug 27, 2016, 12:38:50 PM8/27/16
to Project Jupyter
I have seen that ipywidgets now have an animation class

play = widgets.Play()
slider = widgets.IntSlider()
widgets.jslink((play, 'value'), (slider, 'value'))
widgets.VBox([play, slider])

Does this support graph plotting as well? Like if I want to examine the function y=ax*t, I want to have a interacting widget changing the value of a and each time the graph will draw an animation iterating through value of t. Is this possible yet?

Jonathan Frederic

unread,
Aug 27, 2016, 2:06:20 PM8/27/16
to Project Jupyter

There's a widget backend for matplotlib, it may work with that. Steve or Sylvain would know more about it.


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/b3a03cc4-71d0-4c41-bc20-028e553ab41e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sylvain Corlay

unread,
Aug 28, 2016, 4:42:37 AM8/28/16
to jup...@googlegroups.com
It is possible with the a plotting library called bqplot


The screencast below was done with the play widget

Inline image 1

When matplotlib 2.0 will be released, you should be able to do similar animations with the new widgets - based notebook backend.

Thanks,

Sylvain

On Sat, Aug 27, 2016 at 8:06 PM, Jonathan Frederic <jon.f...@gmail.com> wrote:

There's a widget backend for matplotlib, it may work with that. Steve or Sylvain would know more about it.

On Sat, Aug 27, 2016, 9:38 AM <quang....@gmail.com> wrote:
I have seen that ipywidgets now have an animation class

play = widgets.Play()
slider = widgets.IntSlider()
widgets.jslink((play, 'value'), (slider, 'value'))
widgets.VBox([play, slider])

Does this support graph plotting as well? Like if I want to examine the function y=ax*t, I want to have a interacting widget changing the value of a and each time the graph will draw an animation iterating through value of t. Is this possible yet?

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/b3a03cc4-71d0-4c41-bc20-028e553ab41e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.

To post to this group, send email to jup...@googlegroups.com.

Quang Ha

unread,
Aug 28, 2016, 9:39:41 AM8/28/16
to Project Jupyter

Thanks Sylvian. Can I also snatch the code to provide that on the github link as well? If not do you mind letting me see the codes?

Thanks

Sylvain Corlay

unread,
Aug 28, 2016, 10:03:50 AM8/28/16
to jup...@googlegroups.com
The example notebook for bqplot is available at the link I provided above.

quang....@gmail.com

unread,
Aug 29, 2016, 12:55:53 AM8/29/16
to Project Jupyter
Thanks so much! Do you know when `matplotlib 2.0` shall be released?
Reply all
Reply to author
Forward
0 new messages