strdiags.to_gif

class rewalt.strdiags.to_gif(diagram, *diagrams, **params)

Bases:

Given a non-zero number of diagrams, generates their string diagrams and outputs a GIF animation of the sequence of their visualisations.

Parameters
  • diagram (diagrams.Diagram | shapes.Shape | shapes.ShapeMap) – A diagram or a shape or a shape map.

  • *diagrams (diagrams.Diagram | shapes.Shape | shapes.ShapeMap) – Any number of diagrams or shapes or shape maps.

Keyword Arguments
  • timestep (int) – The time step for the animation (default is 1000).

  • loop (bool) – Whether to loop around the animation (default is False).

  • **params – Passed to StrDiag.draw().