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.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to