On Thu, Nov 11, 2010 at 9:41 PM, Martin Bures <[email protected]> wrote:
> 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 )
>
This could be another instance of a problem resulting from our changes
to how references are taken for callbacks. Try saving the
RectangleSelector you create (I'm just guessing here):
self.rs = RectangleSelector( self.ax,
self._zoom_callback,
drawtype='box',
minspanx=5, minspany=5,
spancoords='pixels' )
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users