0

It seems like the graphics::locator() function can not be used inside a shiny app, anyone knows why it behaviors like that? The output of the function is displayed at the normal plot tab in RStudio, it does not show inside your app.

  • 2
    You are correct that `graphics::locator` cannot be used on shiny apps. Buy what exactly is your requirement? There are existing examples of interactive shiny plots available at https://shiny.rstudio.com/articles/plot-interaction.html. Would one o those techniques work for you? – MrFlick Feb 07 '23 at 16:10
  • Very likely you don't need `locator`. Take a look at `?plotOutput` and you will see that shiny can make available to the server the location of where user hovers, brushes, clicks or double-clicks on a plot. – nicola Feb 07 '23 at 16:25
  • Indeed, i am using the plot interaction features available in shiny to create an app that measures the distance between 2 clicks. I just couldn't find the reason why locator does not work, since imo its an easier solution. – Felipe Kowalski Feb 07 '23 at 19:00

0 Answers0