Skip to content

Using group + color produces incorrect plot #418

@alyst

Description

@alyst

plotly incorrectly draws lines scatter (and scatter3d) plots.

Consider the following minimal example:

df = data.frame(x=c(1,2,3,4,5,6),
           y=c(1,1,2,2,3,3),
           t=c("A","A","B","B","A","A"))

plot_ly(df, type="scatter", x=x, y=y, color=t, group=y, mode="lines")

The output is:
image

In the correct plots only the horizontal segments colored according to t column are expected; also no 1,2,3 entries in the legend, A and B sorted either alphabetically or by their appearance in the data frame.

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