Тёмный

Build a Quick Animation with ipywidgets // ipywidgets play example 

Kimberly Fessel
Подписаться 20 тыс.
Просмотров 8 тыс.
50% 1

Learn how to quickly use Python to make an ipywidgets animation in this tutorial video. I first show you an example of how to create a basic ipywidgets play widget for a moving sine wave with matplotlib. We use ipywidgets Python to animate the plot with ipywidgets interact, and you get to see the ipywidget examples in Jupyter. Next I show you some additional options like selecting the loop button to make Python animate the plot in a loop. We talk about updating the function to account for the default integer values of the ipywidgets play widget, and we also discuss setting plot limits to make sure your animation looks consistent. Finally, I demonstrate how you can add other widgets control other parts of your animation with an example of an ipywidgets slider with the play widget.
0:00 Introduction
0:19 Animation Basics
4:45 Looping
5:40 Update Integers
6:24 Fix Plot Limits
7:18 Add Other Widgets (+ Slider)
9:36 BLOOPERS!
// GitHub CODE:
github.com/kimfetti/Videos/bl...
// Related VIDEOS:
Introduction to ipywidgets - • Introduction to ipywid...
Ipywidgets Interact - • Ipywidgets Interact Fu...
#dataviz #ipywidgets

Наука

Опубликовано:

 

1 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@jdsahr
@jdsahr Год назад
Ms. Fessel: thanks for your instructions. I was getting nowhere fast looking up other answers to the basic Interact() method. The other methods seemed to depend upon "backend" and other subtle configurations ... none of those examples worked, ... But yours did, and I have figured out how to extend well beyond your sine_wave example. Thank you
@vitorribeirosa
@vitorribeirosa Год назад
Neat!!! Thank you very much for your video. Cheers!!!
@rskura
@rskura 2 года назад
Fun stuff! Animations like this would be awesome for teaching.
@KimberlyFessel
@KimberlyFessel 2 года назад
Yes! I absolutely enjoy using animations (as well as other widgets) for teaching. Would love to see more of these in math/data science programs as well as business applications for exploring how various parameters influence outcomes.
@mohammedkastali7096
@mohammedkastali7096 2 года назад
thanks a lot
@fisica-oprometeu895
@fisica-oprometeu895 2 месяца назад
Congrats for the very clear instructions! Do you know if there is a way for, in your given example, to make possible to either play the graphs like an animation an simultaneously control it via a slider? It would be very usefull for me as a teacher so I can show how it envolves in time and have a clear control of specific time cordinates to show properties.
@KimberlyFessel
@KimberlyFessel 2 месяца назад
Thanks much! Great question, and I believe it's similar to another one of this thread. Ultimately, I'm not sure how to use both a slider and the play button for the same element. You can have multiple widgets for the same function ( stackoverflow.com/questions/66566606/python-ipywidgets-functions-that-links-multiple-widgets-in-different-functions) but you may need to switch to observe instead of interact. My guess is that you could write a function where both the play button and the slider feed into the same function to control the output, but I haven't tried it.
@farhodomonov
@farhodomonov 4 месяца назад
thank you
@KimberlyFessel
@KimberlyFessel 4 месяца назад
Glad it helped - cheers!
@s.mohammadmousavi4684
@s.mohammadmousavi4684 2 года назад
Great explanation as always, I was wondering why don't you use Jupyter lab?
@KimberlyFessel
@KimberlyFessel 2 года назад
Thank you! I really just haven't tried JupyterLab yet - it looks cool!
@makisJacob
@makisJacob 2 года назад
Very interesting! I was wondering if we can insert python widgets to ppt presentation. That would be very helpful!
@KimberlyFessel
@KimberlyFessel 2 года назад
Great question! I haven't tried this, but I am curious about it, too. I have been thinking of making a video about exporting and embedding ipywidgets. Hopefully soon!
@findthetruth3021
@findthetruth3021 2 года назад
@@KimberlyFessel yes please
@adityams1659
@adityams1659 2 года назад
How do i increment in float value for play widget??
@elsabecker371
@elsabecker371 2 года назад
Good morning. On my plot aria, my x-axis labels are constricted. (unable to read.) I have tried some codes (text rap) but it is not working. Any advice, please
@joshuaknicely2207
@joshuaknicely2207 5 месяцев назад
is there a way to have the slider and play button affect the same thing? As in, you could use the slider if you wanted, or just press the play button.
@KimberlyFessel
@KimberlyFessel 5 месяцев назад
Great question, and I'm not sure about this one. You can definitely have two different widgets going into the same function (for example, this post: stackoverflow.com/questions/66566606/python-ipywidgets-functions-that-links-multiple-widgets-in-different-functions) but you may need to switch to observe instead of interact. Perhaps you could write a function where both the play button and the slider feed into the same function and control the output? I haven't tried this myself, though, so just a guess.
@mohammed_Ansar
@mohammed_Ansar 2 года назад
Hi u didn't response to my query in LinkedIn.. Can u pls
@KimberlyFessel
@KimberlyFessel 2 года назад
Hi there - just catching up with LinkedIn. If I haven't replied yet - can you resend and mention this RU-vid channel? Cheers!
@mohammed_Ansar
@mohammed_Ansar 2 года назад
@@KimberlyFessel hi dear, yes i did. Hope to see more interesting content besides visualization
Далее
When You Get Ran Over By A Car...
00:15
Просмотров 6 млн
Interactive Python Plots With IPyWidgets
15:59
Просмотров 43 тыс.
Matplotlib Tutorial 9: Creating Animations with PyPlot
10:19
Python App Tutorial with Jupyter Widgets
18:51
Просмотров 20 тыс.
Магниты и S Pen 🖊️
0:37
Просмотров 30 тыс.
Самый СТРАННЫЙ смартфон!
0:57
Просмотров 36 тыс.