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

Method new_saved_frame_seq

lib/matplotlib/animation.py:1742–1762  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1740 return self._iter_gen()
1741
1742 def new_saved_frame_seq(self):
1743 # Generate an iterator for the sequence of saved data. If there are
1744 # no saved frames, generate a new frame sequence and take the first
1745 # save_count entries in it.
1746 if self._save_seq:
1747 # While iterating we are going to update _save_seq
1748 # so make a copy to safely iterate over
1749 return iter([*self._save_seq])
1750 else:
1751 if self._save_count is None:
1752 frame_seq = self.new_frame_seq()
1753
1754 def gen():
1755 try:
1756 while True:
1757 yield next(frame_seq)
1758 except StopIteration:
1759 pass
1760 return gen()
1761 else:
1762 return itertools.islice(self.new_frame_seq(), self._save_count)
1763
1764 def _init_draw(self):
1765 super()._init_draw()

Callers

nothing calls this directly

Calls 1

new_frame_seqMethod · 0.95

Tested by

no test coverage detected