Black Lives Matter. Please consider donating to Black Girls Code today.

Range selection in Plotly

Hi everyone

I am looking for getting the datapoints inside a region of interest . I define region of interest as a rectangle that I would draw directly on the plot and I am interested in the range of data points that lie inside the rectangle i.e. minimum & maximimu x value of data points that lie inside the block and simalarly for y axis .

Currently I am able to do it graphically that is I am able to get to display only the required value , is there a way I get the coordniates of the point (or max min x-y ranges) also ? O in other words , I could get the value of data points at the corners of the selected portion of the plot .

Thanks in advance

Here’s how: http://codepen.io/etpinard/pen/zBWRZb

Thanks alot etienne . Will that work for plotly offline too ?

Thanks a ton :smiley: It worked :smiley: