plotlp.make_animation module

plotlp.make_animation(export_path: str, name=None, fps: float = 24.0, loop: bool = True, pingpong: bool = False, extension: str = '.gif', iterator=<class 'range'>, *, extension2animate='.png', array2animate=None, tif2animate=None, key2animate=None, function2animate=None, parameter2animate=None, value2animate=None, dpi: int = 300, **kwargs)[source]

This module allows to create animations from plots, chose from animating images from a folder or through live generation with a function

Parameters:
  • export_path (str or pathlib.Path) – Path where to save animation.

  • name (str) – name of animation file.

  • fps (float) – Animation Frames Per Second.

  • loop (bool) – True to loop animation.

  • pingpong (bool) – True to make animation back and forth.

  • extension2animate (str) – Extension of animated function in folder.

  • array2animate (function) – Array to animate.

  • tif2animate (function) – Array to tif2animate.

  • key2animate (function) – Keys of tif to animate.

  • function2animate (function) – Function to animate.

  • parameter2animate (str) – Name of parameter to animate.

  • **kwargs (dict) – Other fixed parameter for function, the animated parameter will be ignored.

Examples

>>> from plotlp import make_animation
...
>>> make_animation(saving_path, "myanimation", function2animate=myplottingfunction, parameter2animate=""myparameter", value2animate=np.linspace(mini,maxi,1000), **kwargs) # from function
>>> make_animation(saving_path, "myanimation", extension2animate='.tif') # from folder