In this case, everything is ok:
x <- 1:10
y <- x^3
plot(x, y)
identify(x, y)
But, using qplot there are some troubles:
You may convert your plot, made with ggplot2
to interactive graph by using function ggplotly
from package plotly
, e.g.:
library(ggplot2)
library(plotly)
# Prepare data
x <- 1:10
y <- x^3
names <- paste("Point", LETTERS[x])
# Make a plot with `ggplot` as usual
qplot(x, y, label = names)
# Convert it to interactive plot
ggplotly()
Then move your cursor over a point of interest and find information about it.