Revision: 5848
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5848&view=rev
Author: pkienzle
Date: 2008-07-24 20:06:36 +0000 (Thu, 24 Jul 2008)
Log Message:
-----------
dynamic_collection: collection now has private copy of array
Modified Paths:
--------------
trunk/matplotlib/examples/animation/dynamic_collection.py
Modified: trunk/matplotlib/examples/animation/dynamic_collection.py
===================================================================
--- trunk/matplotlib/examples/animation/dynamic_collection.py 2008-07-24
19:36:34 UTC (rev 5847)
+++ trunk/matplotlib/examples/animation/dynamic_collection.py 2008-07-24
20:06:36 UTC (rev 5848)
@@ -34,6 +34,8 @@
color = cm.jet(rand())
offsets.append((x,y))
facecolors.append(color)
+ collection.set_offsets(offsets)
+ collection.set_facecolors(facecolors)
fig.canvas.draw()
elif event.key=='d':
N = len(offsets)
@@ -41,6 +43,8 @@
ind = random.randint(0,N-1)
offsets.pop(ind)
facecolors.pop(ind)
+ collection.set_offsets(offsets)
+ collection.set_facecolors(facecolors)
fig.canvas.draw()
fig.canvas.mpl_connect('key_press_event', onpress)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins