I've run across a strange problem and perhaps I'm misusing something.  I was
trying to set up picking so that I can interact with plotted objects, and I
get alot of error spew that looks like this:

while checking <class 'matplotlib.lines.Line2D'>
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\matplotlib\artist.py", line 241, in
hitlist
    hascursor,info = self.contains(event)
  File "C:\Python26\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'

This can be reproduced by the following code, even though there is no
picking involved...just mouse motion.  Is there possibly a workaround for
this, or am I doing something wrong?

import sys
from pylab import *

ax = subplot(111)
ax.plot([0,1,2,3])

def on_move(event):
    if event.inaxes:
        lst = ax.hitlist(event)
        print lst

binding_id = connect('motion_notify_event', on_move)


show()


-- 
Daniel Hyams
dhy...@gmail.com
------------------------------------------------------------------------------
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-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to