Home:ALL Converter>Locator() does not work on graphic device

Locator() does not work on graphic device

Ask Time:2022-05-31T19:09:08         Author:ELIA ALDRIGHETTI

Json Formatter

I'm using RStudio and the RPGR package to elaborate some data. I need to obtain the coordiates of a mouse click on a plot. It works using the locator() function but i need a bigger version of my plot so i need to use a graphic device. I tried with window() and X11(), i manage to plot the data and my cursor becomes a cross, meaning it reads the locator function, but it does not record my clicks. Am I doing something wrong? Iread that there are some problems with locator() and RStudio, could it be the cause?

Author:ELIA ALDRIGHETTI,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/72446706/locator-does-not-work-on-graphic-device
yy