Skip to content

ggplotly does not respect group variable when used with color variable #2263

Open
@zhengzheli

Description

@zhengzheli

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:
image

only ggplot:
image

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)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions