ipympl icon indicating copy to clipboard operation
ipympl copied to clipboard

mpl widgets: LassoSelector/RectangleSelector

Open maartenbreddels opened this issue 7 years ago • 2 comments

Hi,

I build a backend for this package in vaex, so vaex is showing many rows/particles in this matplotlib backend. However, I'd like to select things using the lasso or rectangular selector, the rectangular works ok, it draws sth on the screen (see also screenshot). To enabled it I used a ipywidget togglebuttons, but it doesn't play nice with the other buttons (for instance, how would I switch between zoom rectangle and the rectangleselector?). And the lasso selector doesn't draw anything on the screen. Would be really nice to have this, it would be the first time you could do a lasso selection in the notebook to do a freehand selection for ~1 billion rows.

screen shot 2017-04-13 at 21 22 31

maartenbreddels avatar Apr 13 '17 19:04 maartenbreddels

I suspect this is because draw_idle is not working correctly for the widget backend.

tacaswell avatar Aug 26 '17 15:08 tacaswell

The issue of the Lasso selector not drawing has been resolved by matplotlib issue 15852. Until that is released you can do: LassoSelector(..., useblit=False) and it will draw the line.

ianhi avatar Dec 26 '19 22:12 ianhi