I am trying to create a plotly plot from R using a ggplot object, which has custom labels.
#library('devtools')
#install_github("ropensci/plotly")
library('plotly')
set_credentials_file(username="your_name", api_key="your_key")
py <- plotly()
labels = LETTERS[sample(x=26, size=nrow(iris), replace=T)]
ggiris <- ggplot(iris, aes(Petal.Width, Sepal.Length, color = Species)) + geom_point()
r <- py$ggplotly(ggiris)
r$response
I would like that the value for a particular data-point would be taken from labels and would be displayed only when hovering the data-point.