I have a scatter plot using googleVis and I would like to determine the text shown when the cursor is over the data point. When I try to use non-numeric data, I get an error. Here is the code:
library(googlVis) df1 <- data.frame(id = seq(1,10,1), var1 = runif(10), var2 = runif(10)) df1$names <- c("jim","nancy","suzy","mark","alex","jen","luz","jeff","paula","amir") head(df1) df1Plot <- gvisScatterChart(df1[,2:4]) plot(df1Plot)
I would like the personβs name to be displayed when I hover over a point on the plot.
Any suggestions?
source share