I’m using plotly::ggplotly() and I need the user to be able to both select a single point and to select multiple points with brushing. I want both selection options to exist in parallel. The user should be able to click on a point and to lasso select several points, and both of those pieces of information should be recorded.
The problem I’m having is that if I click on a point, then the lasso selection gets reset. But the opposite is not true: if I lasso select and then click on a point, then both are retained.
@daattali Thanks for the clean example and GIF. A more expressive API for selecting data is being developed in the plotly.js repo, you can follow the progress here:
@daattali did you by now perhaps discover a way to save a lasso definition as R variable or function? I’ve just came across this post when looking into whether that is even possible or not
That is a shame. Did you try to talk with cievert about this directly?
Looks like a very useful tool to me for isolating the same selection region across plots of different files / data sets that are plotted
I could imagine a nice solution like storing a selection region and going through a list of files (data frames) to count the abundance of points in that region, or even multiple region. That way plotly could be used to build manual clustering tools in R shiny.