MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / _run

Method _run

site-packages/matplotlib/animation.py:900–934  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

898 return super().grab_frame(**savefig_kwargs)
899
900 def _run(self):
901 # make a duck-typed subprocess stand in
902 # this is called by the MovieWriter base class, but not used here.
903 class ProcessStandin(object):
904 returncode = 0
905
906 def communicate(self):
907 return '', ''
908
909 self._proc = ProcessStandin()
910
911 # save the frames to an html file
912 if self.embed_frames:
913 fill_frames = _embedded_frames(self._saved_frames,
914 self.frame_format)
915 Nframes = len(self._saved_frames)
916 else:
917 # temp names is filled by FileMovieWriter
918 fill_frames = _included_frames(self._temp_names,
919 self.frame_format)
920 Nframes = len(self._temp_names)
921 mode_dict = dict(once_checked='',
922 loop_checked='',
923 reflect_checked='')
924 mode_dict[self.default_mode + '_checked'] = 'checked'
925
926 interval = 1000 // self.fps
927
928 with open(self.outfile, 'w') as of:
929 of.write(JS_INCLUDE)
930 of.write(DISPLAY_TEMPLATE.format(id=uuid.uuid4().hex,
931 Nframes=Nframes,
932 fill_frames=fill_frames,
933 interval=interval,
934 **mode_dict))
935
936
937class Animation(object):

Callers 1

finishMethod · 0.45

Calls 6

ProcessStandinClass · 0.85
_embedded_framesFunction · 0.85
_included_framesFunction · 0.85
openFunction · 0.85
writeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected