> Return a new partial object which when called will behave like func called with the positional arguments args and keyword arguments keywords. If more arguments are supplied to the call, they are appended to args. If additional keyword arguments are supplied, they extend and override keywords.
class matplotlib.animation.FuncAnimation(fig, func, frames=None, init_func=None, fargs=None, save_count=None, *, cache_frame_data=True, **kwargs)
```
> **fig**: Figure
>
> The figure object used to get needed events, such as draw or resize.
>
> **func**: callable
>
> The function to call at each frame. The first argument will be the next value in frames. Any additional positional arguments can be supplied using functools.partial or via the fargs parameter.
>
>
> It is often more convenient to provide the arguments using functools.partial. In this way it is also possible to pass keyword arguments. To pass a function with both positional and keyword arguments, set all arguments as keyword arguments, just leaving the frame argument unset:
```python
def func(frame, art, *, y=None):
...
ani = FuncAnimation(fig, partial(func, art=ln, y='foo'))
```
> **frames** : iterable, int, generator function, or None, optional
>
> Source of data to pass func and each frame of the animation
>
> If an iterable, then simply use the values provided. If the iterable has a length, it will override the save_count kwarg.
>
> **If an integer, then equivalent to passing range(frames)**
>
> If a generator function, then must have the signature:
```python
def gen_function() -> obj
```
> If None, then equivalent to passing itertools.count.
>
> In all of these cases, the values in frames is simply passed through to the user-supplied func and thus can be of any type.
>
> **interval** : int, default: 200
> Delay between frames in milliseconds.
>
> **repeat_delay** : int, default: 0
> The delay in milliseconds between consecutive animation runs, if repeat is True.
>
> **repeat** : bool, default: True
> Whether the animation repeats when the sequence of frames is completed.
> Save the animation as a movie file by drawing every frame.
You need to add the save-method between **animation = matplotlib.animation.FuncAnimation(...)** and **plt.show()**.
```python
movie_filename: str | None = "movie.mp4"
if movie_filename is not None:
animation.save(movie_filename)
```
Please note that you may need the [ffmpeg binaries](https://www.ffmpeg.org/download.html) for MP4. The ffmpeg files need to be accessable by Python. i.e. Python needs to know where they are. Under Windows it is helpful to place the three exe files in the binary directory of Python. Under Linux, the distribution package manager should take care of it.
> Create a slider from valmin to valmax in Axes ax. For the slider to remain responsive you must maintain a reference to it. Call on_changed() to connect to the slider event.
>
> **ax** : Axes
>
> The Axes to put the slider in.
>
> **label** : str
>
> Slider label.
>
> **valmin** : float
>
> The minimum value of the slider.
>
> **valmax** : float
>
> The maximum value of the slider.
>
> **valinit** : float, default: 0.5
> The slider initial position.
>
> **valstep** : float or array-like, default: None
>
> If a float, the slider will snap to multiples of valstep. If an array the slider will snap to the values in the array.