filename (str or Path) – Output file. Supported formats: .gif, .mp4.
fps (int, optional) – Frames per second; overrides any prior set_fps() call and
triggers a rebuild.
dpi (int, optional) – Resolution of the saved frames (default: the figure’s dpi).