tl;dr: Is there a function to get the same output as identify()
or locator()
, but without a mouse click (say a mouse hover position instead)?
I am generating plots, and saving them to a PNG file, and embedding them into my application. When the user interacts with the image in my application, I'd like to send those screen coordinates back to the graphics device in R to understand where the user is in the data coordinates.
I need a version of identify()
or locator()
that lets me pass in the mouse coordinates explicitly.
For example, is the user hovering on a point corresponding to year 2015 and birth rate 90, if they are hovering on pixel 1000, 2000?