MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / setup

Method setup

lib/matplotlib/animation.py:775–792  ·  view source on GitHub ↗
(self, fig, outfile, dpi=None, frame_dir=None)

Source from the content-addressed store, hash-verified

773 super().__init__(fps, codec, bitrate, extra_args, metadata)
774
775 def setup(self, fig, outfile, dpi=None, frame_dir=None):
776 outfile = Path(outfile)
777 _api.check_in_list(['.html', '.htm'], outfile_extension=outfile.suffix)
778
779 self._saved_frames = []
780 self._total_bytes = 0
781 self._hit_limit = False
782
783 if not self.embed_frames:
784 if frame_dir is None:
785 frame_dir = outfile.with_name(outfile.stem + '_frames')
786 frame_dir.mkdir(parents=True, exist_ok=True)
787 frame_prefix = frame_dir / 'frame'
788 else:
789 frame_prefix = None
790
791 super().setup(fig, outfile, dpi, frame_prefix)
792 self._clear_temp = False
793
794 def grab_frame(self, **savefig_kwargs):
795 _validate_grabframe_kwargs(savefig_kwargs)

Callers 2

setupMethod · 0.45
setupMethod · 0.45

Calls 1

PathClass · 0.85

Tested by

no test coverage detected