8000 Added tags for simple_scatter.py demo · matplotlib/matplotlib@211239c · GitHub
[go: up one dir, main page]

Skip to content

Commit 211239c

Browse files
gougouasmistory645
authored andcommitted
Added tags for simple_scatter.py demo
1 parent 42b88d0 commit 211239c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

galleries/examples/animation/simple_scatter.py

Lines changed: 9 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,9 @@ def animate(i):
3131
# ani.save('scatter.gif', writer=writer)
3232

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

0 commit comments

Comments
 (0)
0