I spent some time trying to cobble one together but it was taking too much time so I tried the following and it seems to work now:

Instead of using a thick line2D and adding it to the drawing, I added a patches.Rectangle instead.  The line2D works in 0.88.5 but not in 0.99.  The newer version was tripping over the Artist.contains() function call when used with line2D.

On Mon, Aug 31, 2009 at 1:28 PM, Michael Droettboom <mdroe@stsci.edu> wrote:
Can you provide a standalone example that reproduces this error?


Andrew Kelly wrote:
I recently re-installed matplotlib (0.99) on my vista machine and my code that worked yesterday (no changes) no longer runs because of the following matplotlib error:

 File "C:\Python25\Lib\site-packages\matplotlib\lines.py", line 286, in contains
   path, affine = self._transformed_path.get_transformed_path_and_affine()
AttributeError: 'NoneType' object has no attribute 'get_transformed_path_and_affine'

All I am doing is initially drawing a line2D (which works) and then testing if line2D.contains(event)==True if I mouse over the line.  As I said this worked fine yesterday.

I tried re-installing with an older version but to no avail.  I am totally clueless as to why this is happening.  Anyone have a guess.



Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now.  http://p.sf.net/sfu/bobj-july

Matplotlib-users mailing list

Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA