Skip to content

plotly silently drops groups of size 1 when colouring / grouping variable is non-numeric #1876

Closed
@cnowzohour

Description

@cnowzohour

Only group "1" is shown:

plot_ly(type = "scatter", mode = "markers", x = 1:4, y = 1:4, color = c("1", "1", "1", "2"))

Making both groups have size >1 makes the bug disappear:

plot_ly(type = "scatter", mode = "markers", x = 1:4, y = 1:4, color = c("1", "1", "2", "2"))

Also grouping on a numeric variable makes the bug disappear:

plot_ly(type = "scatter", mode = "markers", x = 1:4, y = 1:4, color = c(1, 1, 1, 2))

I suspect this might be related to #1133

I am running R 3.6.3 on RHEL 7.6 with plotly 4.9.2.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