bqplot / bqplot

Plotting library for IPython/Jupyter notebooks
https://bqplot.github.io/bqplot
Apache License 2.0
3.63k stars 464 forks source link

Questions and ideas for selectors #462

Open maartenbreddels opened 7 years ago

maartenbreddels commented 7 years ago

First some questions. I noticed an inconsistency between using a lasso selector, and a brush selector. The lasso selector pushes an object to ScatterBase.model.selected ), while in the rest of the code (click_handler and what brush selector uses) it is assumed to be a list of indices. For integrating with for instance ipyvolume is would be great if it can all be a list of indices, so the lasso selector can be used in a similar way as the brush selector in this example. Maybe there is a reason the lasso is done differently, or it's old code, or it's a WIP status now?

Currently the selectors are immediate (for instance brush selector, although there is the brushing property), or after finishing (like lasso selector). It would be nice if this would be more uniform, and also for performance, have a delayed response. I was thinking of the following.

When having 10,000 scatter points, I believe this can make things much smoother, but also for what I have planned with vaex, where an update takes about 1 second, I'd like to have some delays (debounce) when doing selections.

Let me know if this scheme sound good, or if there are already ideas about it.

ssunkara1 commented 7 years ago

@maartenbreddels The 'direct/throttle/debounce' idea sounds great. Yeah for large amounts of data it will make the user experience much better. From the link you sent, it looks like we need mainly 'direct/debounce'.

About the LassoSelector, as you can see from the example, it selects separate sets of points. Of course, all of them are selected but, I think, it is important to maintain the separation between the different subsets in the whole selection. May be @ChakriCherukuri can add something here. For integration, may be we can look at having a separate attribute for the LassoSelector so that selected is always a flattened list. Will that be good for your integration?

maartenbreddels commented 7 years ago

Could that separation be reflected in lassoselector and exposed in a trait? Say lassoselector.selection? And keep the scatterbase.selected always flat, would that work?

(from mobile phone)

Op 19 mrt. 2017 15:16 schreef "ssunkara1" notifications@github.com:

@maartenbreddels https://github.com/maartenbreddels The 'direct/throttle/debounce' idea sounds great. Yeah for large amounts of data it will make the user experience much better. From the link you sent, it looks like we need mainly 'direct/debounce'.

About the LassoSelector, as you can see from the example, it selects separate sets of points. Of course, all of them are selected but, I think, it is important to maintain the separation between the different subsets in the whole selection. May be @ChakriCherukuri https://github.com/ChakriCherukuri can add something here. For integration, may be we can look at having a separate attribute for the LassoSelector so that selected is always a flattened list. Will that be good for your integration?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bloomberg/bqplot/issues/462#issuecomment-287619599, or mute the thread https://github.com/notifications/unsubscribe-auth/ABryPRZlE_uoxi2pxSD8jpGhdiyLyokBks5rnTi7gaJpZM4Mhscx .

maartenbreddels commented 7 years ago

I think I initially misread your piece, this is exactly what you propose right? :)

ssunkara1 commented 7 years ago

Yeah that is what I was suggesting!

SylvainCorlay commented 6 years ago

@rmenegaux can you comment on this in light of your recent refactoring?

rmenegaux commented 6 years ago

@SylvainCorlay the refactoring has left this issue untouched, this still needs to be addressed