autofig.figure.Figure.animate (function)
def animate(self, fig=None, i=None, tight_layout=False, draw_sidebars=True, draw_title=True, subplot_grid=None, interval=100, animate_callback=None, show=False, save=False, save_kwargs={}, save_afig=False)
Draw the contents of the autofig.figure.Figure to a matplotlib animation.
See also:
Arguments
fig(matplotlib figure or None, optional, default=None): matplotlib figure instances to use during drawing.i(list/array, required): iterable values fori. Each item in the list/array will become a single frame in the resulting animation.tight_layout(bool, optional, default=True): whether to callfig.tight_layoutafter positioning all subplots, but before drawing any applicable sidebars.draw_sidebars(bool, optional, default=True): whether to draw any applicable sidebars.draw_title(bool, optional, default=True): passed on to autofig.axes.Axes.draw for all autofig.axes.Axes in autofig.figure.Figure.axes. Whether to draw the title on the matplotlib axes.subplot_grid(None or tuple, optional, default=None): Override the subplot locations. Passed on to autofig.axes.Axes.append_subplot for each autofig.axes.Axes in autofig.figure.Figure.axes.interval(int, optional, default=100): time in ms between each frame in the animation.animate_callback(callable, optional, default=None): Function which takes the matplotlib figure object and will be called at each frame within the animation.show(bool, optional, default=False): whether to immediately draw and show the resulting matplotlib animation.save(False or string, optional, default=False): the filename to save the resulting matplotlib animation, or False to not save.save_kwargs(dict, optional, default={}): dictionary of keyword arguments to be passed on to anim.savesave_afig(False or string, optional, default=False): the filename to save the autofig object, along with the options for this animate call. See also autofig.figure.Figure.save.
Returns
- (matplotlib FuncAnimation): the matplotlib animation object.