From fcba632f8ac5092d0877f29243b9b47670b69d46 2009-08-25 20:14:34
From: Brian Granger <ellisonbg@gmail.com>
Date: 2009-08-25 20:14:34
Subject: [PATCH] Mostly finished on edits to inputhook.

---

diff --git a/docs/examples/lib/gui-mpl.py b/docs/examples/lib/gui-mpl.py
index 165a60e..c77c70a 100644
--- a/docs/examples/lib/gui-mpl.py
+++ b/docs/examples/lib/gui-mpl.py
@@ -5,6 +5,12 @@ In [1]: %gui [backend]
 In [2]: %run switchgui [backend]
 
 where the optional backend can be one of:  qt4, gtk, tk, wx.
+
+Because of subtle difference in how Matplotlib handles the different GUI 
+toolkits (in things like draw and show), minor modifications to this script
+have to be made for Tk to get it to work with the 0.99 and below releases
+of Matplotlib.  However, in the future, Matplotlib should be able to have 
+similar logic for all the toolkits, as they are all now using PyOS_InputHook.
 """
 
 import sys
@@ -34,7 +40,7 @@ x = np.linspace(0,pi,500)
 
 print "A plot has been created"
 line, = plot(x,sin(2*x))
-inputhook.spin()
+inputhook.spin() # This has to be removed for Tk
 
 
 print "Now, we will update the plot..."
@@ -45,4 +51,4 @@ for i in range(1,51):
     line.set_data(x,sin(x*i))
     plt.title('i=%d' % i)
     plt.draw()
-    inputhook.spin()
+    inputhook.spin() # This has to be removed for Tk