# Selected values from scatterplot

**URL:** <https://community.plotly.com/t/selected-values-from-scatterplot/9461>\
**Category:** Plotly R\
**Created:** [April 5, 2018, 7:16pm UTC](https://community.plotly.com/t/selected-values-from-scatterplot/9461 "2018-04-05T19:16:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cthielen](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@cthielen](https://community.plotly.com/u/cthielen)\
**Post date:** [April 5, 2018, 7:16pm UTC](https://community.plotly.com/t/selected-values-from-scatterplot/9461/1 "2018-04-05T19:16:15Z")

</div>

I am looking to get the values which the user selected from a scatterplot.

In shiny I embedded the event\_data(“plotly\_selected”) method and can see that it delivers some curveNumber and pointNumber values from the selected observations.

Is there a possibilty to slice the dataframe based on the selected datapoints (using box select) from the plot?

Thank you.

---

<div class="post-metadata">

**Author:** ![cthielen](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@cthielen](https://community.plotly.com/u/cthielen)\
**Post date:** [April 6, 2018, 6:35pm UTC](https://community.plotly.com/t/selected-values-from-scatterplot/9461/2 "2018-04-06T18:35:02Z")

</div>

I am looking for something like this:

[https://shiny.rstudio.com/gallery/plot-interaction-selecting-points.html](https://shiny.rstudio.com/gallery/plot-interaction-selecting-points.html)

However, plotlyOutput does not support the brush method. Or am I missing something? Thanks.

Edit: Got it. This helped me: [https://plot.ly/r/shiny-coupled-events/](https://plot.ly/r/shiny-coupled-events/)
