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

Method _draw_frame

lib/matplotlib/animation.py:1796–1824  ·  view source on GitHub ↗
(self, framedata)

Source from the content-addressed store, hash-verified

1794 self._save_seq.clear()
1795
1796 def _draw_frame(self, framedata):
1797 if self._cache_frame_data:
1798 # Save the data for potential saving of movies.
1799 self._save_seq.append(framedata)
1800
1801 # Call the func with framedata and args. If blitting is desired,
1802 # func needs to return a sequence of any artists that were modified.
1803 self._drawn_artists = self._func(framedata, *self._args)
1804
1805 if self._blit:
1806
1807 err = RuntimeError('When blit=True, the animation function must '
1808 'return a sequence of Artist objects.')
1809 try:
1810 # check if a sequence
1811 iter(self._drawn_artists)
1812 except TypeError:
1813 raise err from None
1814
1815 # check each item if it's artist
1816 for i in self._drawn_artists:
1817 if not isinstance(i, mpl.artist.Artist):
1818 raise err
1819
1820 self._drawn_artists = sorted(self._drawn_artists,
1821 key=lambda x: x.get_zorder())
1822
1823 for a in self._drawn_artists:
1824 a.set_animated(self._blit)
1825
1826
1827def _validate_grabframe_kwargs(savefig_kwargs):

Callers 1

_init_drawMethod · 0.95

Calls 2

get_zorderMethod · 0.80
set_animatedMethod · 0.45

Tested by

no test coverage detected