A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://animatplot.readthedocs.io/en/latest/_as_gen/animatplot.Animation.html below:

animatplot.Animation — animatplot 0.4.3 documentation

animatplot animatplot.Animation
class animatplot.Animation(blocks, timeline=None, fig=None)[source]

The foundation of all animations.

Parameters:
  • blocks (list of animatplot.animations.Block) – A list of blocks to be animated

  • timeline (Timeline or 1D array, optional) – If an array is passed in, it will be converted to a Timeline. If not given, a timeline will be created using the length of the first block.

  • fig (matplotlib figure, optional) – The figure that the animation is to occur on

animation

a matplotlib animation returned from FuncAnimation

Methods

__init__(blocks, timeline=None, fig=None)[source]
controls(timeline_slider_args={}, toggle_args={})[source]

Creates interactive controls for the animation

Creates both a play/pause button, and a time slider at once

Parameters:
  • timeline_slider_args (Dict, optional) – A dictionary of arguments to be passed to timeline_slider()

  • toggle_args (Dict, optional) – A dictionary of argyments to be passed to toggle()

save(*args, **kwargs)[source]

Saves an animation

A wrapper around matplotlib.animation.Animation.save()

save_gif(filename)[source]

Saves the animation to a gif

A convience function. Provided to let the user avoid dealing with writers.

Parameters:

filename (str) – the name of the file to be created without the file extension

timeline_slider(text='Time', ax=None, valfmt=None, color=None)[source]

Creates a timeline slider.

Parameters:
  • text (str, optional) – The text to display for the slider. Defaults to ‘Time’

  • ax (matplotlib.axes.Axes, optional) – The matplotlib axes to attach the slider to.

  • valfmt (str, optional) – a format specifier used to print the time Defaults to ‘%s’ for datetime64, timedelta64 and ‘%1.2f’ otherwise.

  • color – The color of the slider.

toggle(ax=None)[source]

Creates a play/pause button to start/stop the animation

Parameters:

ax (matplotlib.axes.Axes, optional) – The matplotlib axes to attach the button to.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4