# iris.experimental.animate¶

Wrapper for animating iris cubes using iris or matplotlib plotting functions

In this module:

iris.experimental.animate.animate(cube_iterator, plot_func, fig=None, **kwargs)

Animates the given cube iterator.

Args:

Kwargs:

• fig (matplotlib.figure.Figure instance):
By default, the current figure will be used or a new figure instance created if no figure is available. See matplotlib.pyplot.gcf().
• coords (list of Coord objects or coordinate names):
Use the given coordinates as the axes for the plot. The order of the given coordinates indicates which axis to use for each, where the first element is the horizontal axis of the plot and the second element is the vertical axis of the plot.
• interval (int, float or long):
Defines the time interval in milliseconds between successive frames. A default interval of 100ms is set.
• vmin, vmax (int, float or long):
Color scaling values, see matplotlib.colors.Normalize for further details. Default values are determined by the min-max across the data set over the entire sequence.

See matplotlib.animation.FuncAnimation for details of other valid keyword arguments.

Returns:
FuncAnimation object suitable for saving and or plotting.

For example, to animate along a set of cube slices:

cube_iter = cubes.slices(('grid_longitude', 'grid_latitude'))
ani = animate(cube_iter, qplt.contourf)
plt.show()