Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7722272

Browse files
committed
DOC: correct signature for animation update function in rain example
1 parent 828ec6f commit 7722272

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)