ogstools.meshplotlib.animation module#

ogstools.meshplotlib.animation.animate(mesh_series, property, timesteps=None, titles=None)[source]#

Create an animation for a property of a mesh series with given timesteps.

Parameters:
  • mesh_series (MeshSeries) – the mesh series containing the data to visualize

  • property (Property) – the property field to be visualized on all timesteps

  • timesteps (Sequence | None) – if sequence of int: the timesteps to animate if sequence of float: the timevalues to animate

  • titles (list[str] | None) – the title on top of the animation for each frame

Return type:

FuncAnimation

ogstools.meshplotlib.animation.save_animation(anim, filename, fps)[source]#

Save a FuncAnimation with some codec presets.

Parameters:
  • anim (FuncAnimation) – the FuncAnimation to be saved

  • filename (str) – the name of the resulting file

  • fps (int) – the number of frames per second

Return type:

bool