RUVIDEO
Поделитесь видео 🙏

Animations in Python with Matplotlib смотреть онлайн

📁 Обучение 👁️ 26 📅 02.12.2023

You can find my blog post about animations with Matplotlib here: http://danielmuellerkomorowska.com/2020/06/12/animations-with-matplotlib/

Animations with Matplotlib are easy and anything that can be plotted in a figure can also be animated. We only need the FuncAnimation class which we can import from matplotlib.animation. The only required parameters to create an instance of FuncAnimation are fig, the figure where the animation is supposed to happend, and func, the function that generates each frame in sequence. We can write func ourselves and for most purposes it requires only one parameter, called i. Since an animation requires some sort of change between each frame we need to change what exactly func does and i allows us to do exactly that. An optional parameter of FuncAnimation called frames allows us to specify what exactly is passed to i for each frame. By default it is just a sequence (an itertools.count call to be precise).
In this particular example, frames is a sequence with a step size of 50 and the parameter i tells func which parts of the data to plot for a particular frame. There is one more function called init_func, which is optional but it is important, especially for repeating animations. init_func is called at the beginning of the animation and whenever the animation repeats. So it has to reset the initial state of the figure.
That's it. Let me know if you have questions about animations with Matplotlib.

Example code from this video:
https://gist.github.com/danielmk/c09e8dfd54651cd94e75be15a2038e0e
https://gist.github.com/danielmk/f7d2c5f1be1ca9b9b4d1654509c3f990

Here is an animation I made with Matplotlib:
https://youtu.be/Jngqcak86NU

FuncAnimation docs:
https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.animation.FuncAnimation.html

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Animations in Python with Matplotlib» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.