Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,7 @@ def __init__(self, fig, event_source=None, blit=False):
# that cause the frame sequence to be iterated.
self.frame_seq = self.new_frame_seq()
self.event_source = event_source
self.event_source.add_callback(self._step)

# Instead of starting the event source now, we connect to the figure's
# draw_event, so that we only start once the figure has been drawn.
Expand Down Expand Up @@ -923,13 +924,9 @@ def _start(self, *args):
return
# First disconnect our draw event handler
self._fig.canvas.mpl_disconnect(self._first_draw_id)

# Now do any initial draw
self._init_draw()

# Add our callback for stepping the animation and
# actually start the event_source.
self.event_source.add_callback(self._step)
# Actually start the event_source.
self.event_source.start()

def _stop(self, *args):
Expand Down
Loading