Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 66dfeaa

Browse filesBrowse files
gougouasmistory645
authored andcommitted
Added tags for simple_scatter.py demo
1 parent 42b88d0 commit 66dfeaa
Copy full SHA for 66dfeaa

File tree

Expand file treeCollapse file tree

1 file changed

+11
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-3
lines changed

‎galleries/examples/animation/simple_scatter.py

Copy file name to clipboardExpand all lines: galleries/examples/animation/simple_scatter.py
+11-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.