I am having a little issue with the matplotlib.widgets RectangleSelector.
The behavior is that the first time I try to select a region, no rectangle
draws. All subsequent uses work correctly.
Here is how I am calling:
if self.zoomMode:
if self.canvas.widgetlock.locked():
self.canvas.widgetlock.release( self.lasso )
RectangleSelector( self.ax,
self._zoom_callback,
drawtype='box',
minspanx=5, minspany=5,
spancoords='pixels' )
else:
if self.canvas.widgetlock.locked():
self.canvas.widgetlock.release( self.lasso )
if event.inaxes is None: return
self.lasso = Lasso( event.inaxes,
( event.xdata, event.ydata ),
self._selection_callback )
self.canvas.widgetlock( self.lasso )
I have attempted to debug this behavior. If I breakpoint at the call to
RectangleSelector and then step in, selection works as-expected on the first
call. However, if I move the breakpoint into the callback, it does not work
correctly on the first call and the breakpoint is not reached. Again, all
subsequent uses work correctly.
Any thoughts?
I am using 0.99.1.1 on Ubuntu 10.04
Linux martin-laptop 2.6.32-25-generic #45-Ubuntu SMP Sat Oct 16 19:52:42 UTC
2010 x86_64 GNU/Linux
'/usr/lib/pymodules/python2.6/matplotlib/__init__.pyc'
Thanks.
martin.
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users