plotly.R
plotly.R copied to clipboard
ggplotly does not respect group variable when used with color variable
Hi, The following is affecting my ability to use ggplotly: When color = Species and group = 1, all dots should be connected, irrespective of species, but ggplotly does not respect the group variable and it is as if I only wrote color = Species. Thanks for your work on this great library! If there is a workaround please let me know.
With ggplotly:

only ggplot:

ggplotly(ggplot(data = iris) +
geom_line(mapping = aes(Sepal.Length, Sepal.Width, color = Species, group = 1)) +
geom_point(mapping = aes(Sepal.Length, Sepal.Width, color = Species, group = 1)))