|
From: <ry...@us...> - 2010-04-16 19:01:36
|
Revision: 8238
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8238&view=rev
Author: ryanmay
Date: 2010-04-16 19:01:30 +0000 (Fri, 16 Apr 2010)
Log Message:
-----------
Add basic example/test for close_event.
Added Paths:
-----------
trunk/matplotlib/examples/event_handling/close_event.py
Added: trunk/matplotlib/examples/event_handling/close_event.py
===================================================================
--- trunk/matplotlib/examples/event_handling/close_event.py (rev 0)
+++ trunk/matplotlib/examples/event_handling/close_event.py 2010-04-16 19:01:30 UTC (rev 8238)
@@ -0,0 +1,10 @@
+import matplotlib.pyplot as plt
+
+def handle_close(evt):
+ print 'Closed Figure!'
+
+fig = plt.figure()
+fig.canvas.mpl_connect('close_event', handle_close)
+
+plt.text(0.35, 0.5, 'Close Me!', dict(size=30))
+plt.show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|