Revision: 5882
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5882&view=rev
Author:   pkienzle
Date:     2008-07-26 00:01:18 +0000 (Sat, 26 Jul 2008)

Log Message:
-----------
Fix contains() for lines; don't redraw axis frame

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/axes.py
    trunk/matplotlib/lib/matplotlib/lines.py

Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py     2008-07-25 23:54:37 UTC (rev 
5881)
+++ trunk/matplotlib/lib/matplotlib/axes.py     2008-07-26 00:01:18 UTC (rev 
5882)
@@ -1503,8 +1503,6 @@
         artists.extend(self.tables)
         if self.legend_ is not None:
             artists.append(self.legend_)
-        if self.axison and self._frameon:
-            artists.append(self.frame)
 
         dsu = [ (a.zorder, i, a) for i, a in enumerate(artists)
                 if not a.get_animated() ]

Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py    2008-07-25 23:54:37 UTC (rev 
5881)
+++ trunk/matplotlib/lib/matplotlib/lines.py    2008-07-26 00:01:18 UTC (rev 
5882)
@@ -239,7 +239,7 @@
         if self._invalid:
             self.recache()
         if len(self._xy)==0: return False,{}
-        tpath, _ = self._transformed_path.get_transformed_path_and_affine()
+        tpath = self._transformed_path.get_fully_transformed_path()
         xyt = tpath.vertices
         xt = xyt[:, 0]
         yt = xyt[:, 1]
@@ -250,7 +250,7 @@
         else:
             pixels = self.figure.dpi/72. * self.pickradius
 
-        if self._linestyle == 'None':
+        if self._linestyle in ['None',None]:
             # If no line, return the nearby point(s)
             d = np.sqrt((xt-mouseevent.x)**2 + (yt-mouseevent.y)**2)
             ind, = np.nonzero(np.less_equal(d, pixels))
@@ -258,10 +258,11 @@
             # If line, return the nearby segment(s)
             ind = segment_hits(mouseevent.x,mouseevent.y,xt,yt,pixels)
         if 0:
+            print 'linestyle',self._linestyle
             print 'xt', xt, mouseevent.x
             print 'yt', yt, mouseevent.y
-            print 'd', (xt-mouseevent.x)**2., (yt-mouseevent.y)**2.
-            print d, pixels, ind
+            print 'dx,dy', (xt-mouseevent.x)**2., (yt-mouseevent.y)**2.
+            print 'ind',ind
         return len(ind)>0,dict(ind=ind)
 
     def get_pickradius(self):


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
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to