I created a scatterplot which will be linked to a datatable for filtering purposes. When someone drags with the mouse, the plot zooms in. I’d like to know which points are in the zoomed view, so that I can give them the appropriate colour and communicate the selection to the datatable. I looked at the ‘plotly_relayout’ event, but the eventdata seems to contain only information about the axis.
Is there an easy way to find which points are in the current view?
By the way, are you also planning on adding support for other events? It would be really useful if we could e.g. customise how double-click is handled (e.g. zoom and call some other function).
I am hoping to take the zoomed in points of a scatter plot and display them in a datatable and for the datatable to adjust to the zoom. I am using Shiny and I can get it to work for plotly_click
Lasso is a really interesting tool to get the data but I would like to know about the initial question, is it possible to get the data points (or data index is fine too) of the displayed data (for example, after zoom or relayout)
I think I have a similar question in that I would like to select datapoint on the scatter plot for filtering purposes. I have created the scatter plot as https://plot.ly/r/shinyapp-plotly-events/
and using lasso or box, I get those datapoint I want to exclude return on screen. I am just wondering if there is a way to save the return point into R directly as a vector for downstream processing. At the moment, I need to cut and paste those return value into a text file… I guess there must be a better wat to do so. Many thanks for your help.
It’s been a while since the last post on this thread, but I need to do the same thing that is being asked here by the OP. Has this feature been integrated yet?
Note: Posted a question about this on StackOverflow:
Hi ,
Is there any way I can get data points info when I zoom into 3-D Scatter plots .
Like when I zoom in , if I can get handle of some object which can help know how many data points are present in current view/scene .
I’m also looking for a way to get visible datapoints in zoomed view. It seems odd that selectedData provides both points and range while relayoutData only returns the latter.
The linked issue on Github ( #145) seems to be waiting for sponsorship.