dantro.plot_creators._movie_writers module¶
This module implements Movie Writer utilities
-
class
dantro.plot_creators._movie_writers.FileWriter(*, name_padding: int = 7, fstr: str = '{dir:}/{num:0{pad:}d}.{ext:}')[source]¶ Bases:
matplotlib.animation.AbstractMovieWriterA matplotlib file writer
It adheres to the corresponding matplotlib animation interface.
-
__init__(*, name_padding: int = 7, fstr: str = '{dir:}/{num:0{pad:}d}.{ext:}')[source]¶ Initialize a FileWriter, which adheres to the matplotlib.animation interface and can be used to write individual files.
- Parameters
name_padding (int, optional) – How wide the numbering should be
fstr (str, optional) – The format string to generate the name
-
saving(fig, base_outfile: str, dpi: int = None, **setup_kwargs)[source]¶ Create an instance of the context manager
- Parameters
fig (matplotlib.Figure) – The figure object to save
base_outfile (str) – The path this movie writer would store a movie file at; the file name will be interpreted as the name of the directory that the frames are saved to; the file extension is retained.
dpi (int, optional) – The desired densiy
**setup_kwargs – Passed to setup method
- Returns
this object, which also is a context manager.
- Return type
-
_abc_impl= <_abc_data object>¶
-