8000 Merge pull request #29975 from tacaswell/doc/fix_animation_update_sig… · matplotlib/matplotlib@9116715 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9116715

Browse files
authored
Merge pull request #29975 from tacaswell/doc/fix_animation_update_signature
DOC: correct signature for animation update function in rain example
2 parents 919d9e9 + 7722272 commit 9116715

File tree

1 file changed

+2
-1
lines changed
  • galleries/examples/animation

1 file changed

+2
-1
lines changed

galleries/examples/animation/rain.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ def update(frame_number):
6767
scat.set_edgecolors(rain_drops['color'])
6868
scat.set_sizes(rain_drops['size'])
6969
scat.set_offsets(rain_drops['position'])
70+
return [scat]
7071

7172

7273
# Construct the animation, using the update function as the animation director.
73-
animation = FuncAnimation(fig, update, interval=10, save_count=100)
74+
animation = FuncAnimation(fig, update, interval=10, save_count=100, blit=True)
7475
plt.show()
7576

7677
# %%

0 commit comments

Comments
 (0)
0