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

Skip to content

Commit b8540b4

Browse files
authored
Merge pull request #27302 from gougouasmi/feature_tagging_simple_scatter
Tags for simple_scatter.py demo
2 parents 1b08207 + 66dfeaa commit b8540b4

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

galleries/examples/animation/simple_scatter.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
def animate(i):
2121
scat.set_offsets((x[i], 0))
22-
return scat,
22+
return (scat,)
2323

24-
ani = animation.FuncAnimation(fig, animate, repeat=True,
25-
frames=len(x) - 1, interval=50)
24+
25+
ani = animation.FuncAnimation(fig, animate, repeat=True, frames=len(x) - 1, interval=50)
2626

2727
# To save the animation using Pillow as a gif
2828
# writer = animation.PillowWriter(fps=15,
@@ -31,3 +31,11 @@ def animate(i):
3131
# ani.save('scatter.gif', writer=writer)
3232

3333
plt.show()
34+
35+
# %%
36+
#
37+
# .. tags::
38+
# component: animation,
39+
# plot-type: scatter,
40+
# purpose: reference,
41+
# level: intermediate

0 commit comments

Comments
 (0)