Revision: 8730
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8730&view=rev
Author:   ryanmay
Date:     2010-10-06 16:03:48 +0000 (Wed, 06 Oct 2010)

Log Message:
-----------
contains() was relying on some attributes being set by draw(). Add code to make 
contains() not cause a traceback if draw() has not been called.

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

Modified: trunk/matplotlib/lib/matplotlib/lines.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/lines.py    2010-10-06 16:00:27 UTC (rev 
8729)
+++ trunk/matplotlib/lib/matplotlib/lines.py    2010-10-06 16:03:48 UTC (rev 
8730)
@@ -248,6 +248,7 @@
         # chance to init axes (and hence unit support)
         self.update(kwargs)
         self.pickradius = pickradius
+        self.ind_offset = 0
         if is_numlike(self._picker):
             self.pickradius = self._picker
 
@@ -283,6 +284,8 @@
         if len(self._xy)==0: return False,{}
 
         # Convert points to pixels
+        if self._transformed_path is None:
+            self._transform_path()
         path, affine = self._transformed_path.get_transformed_path_and_affine()
         path = affine.transform_path(path)
         xy = path.vertices


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to