I don't quite understand the difference between text and label in ggplot2.
For instance:
When I try to convert ggplot2 object to plotly interactive object using label as tooltip, it worked; while I got the Too few points to calculate an ellipse error when using text as tooltip.
Why?
p <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species, label = row.names(iris))) +
geom_point()+
stat_ellipse(aes(fill = Species), geom = "polygon", level = 0.95, alpha = 0.1, show.legend = F)
ggplotly(p)
p2 <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, color = Species, text = row.names(iris))) +
geom_point()+
stat_ellipse(aes(fill = Species), geom = "polygon", level = 0.95, alpha = 0.1, show.legend = F)
ggplotly(p2)




