ogstools.plot.animation module#
- ogstools.plot.animation.animate(fig, plot_func, *args, **kwargs)[source]#
Create an animation by applying a plot function on a sequence of meshes.
- Parameters:
fig (Figure) – The figure on which the animation is rendered
plot_func (Callable) – The function which is applied for all timevalues. Expects to read a time value and a mesh.
- Return type:
FuncAnimation
- Positional Arguments:
Sequences where each element corresponds to a frame. plot_func has to accept the individual elements of these sequences as arguments. Most common choice here would be a MeshSeries as an iterator for the meshes and possibly its timevalues for labeling.
- Keyword Arguments:
interval: Delay between frames in milliseconds (default=50).
repeat: Whether the animation repeats at the end.