We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fee8218 commit 3389ed7Copy full SHA for 3389ed7
examples/animation/dynamic_collection.py
@@ -34,13 +34,17 @@ def onpress(event):
34
color = cm.jet(rand())
35
offsets.append((x,y))
36
facecolors.append(color)
37
+ collection.set_offsets(offsets)
38
+ collection.set_facecolors(facecolors)
39
fig.canvas.draw()
40
elif event.key=='d':
41
N = len(offsets)
42
if N>0:
43
ind = random.randint(0,N-1)
44
offsets.pop(ind)
45
facecolors.pop(ind)
46
47
48
49
50
fig.canvas.mpl_connect('key_press_event', onpress)
0 commit comments