You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting a ggplot2 plot to plotly using ggplotly(), the generated tooltip does not contain aesthetic entry if its name is equal to 'group'.
Would it be like there are some 'reserved' word that can't be used as aesthetic names, in order for the tooltip generation to work correctly ?
Reproducible example
library(ggplot2)
library(plotly)
data(iris)
p1 <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, col = Species)) +
geom_point()
p1
ggplotly(p1, tooltip = "Species")
# => works fine!
iris2 <- iris
iris2$group <- iris2$Species
p2 <- ggplot(iris2, aes(x = Sepal.Length, y = Sepal.Width, col = group)) +
geom_point()
p2
ggplotly(p2, tooltip = "group")
# => does not show 'group' in tooltip
ggplotly(p2, tooltip = "all")
# => shows 'Sepal.Length' and 'Sepal.Width', but not 'group' in tooltip
Description
When converting a
ggplot2
plot to plotly usingggplotly()
, the generated tooltip does not contain aesthetic entry if its name is equal to 'group'.Would it be like there are some 'reserved' word that can't be used as aesthetic names, in order for the tooltip generation to work correctly ?
Reproducible example
Environment information
The text was updated successfully, but these errors were encountered: