Skip to content

Color palette don't respect the un-dropped factor level #6427

Closed as duplicate of#5728
@Yunuuuu

Description

@Yunuuuu

Note: b has no color palette

library(ggplot2)
ggplot(data.frame(x = 1, y = 1, color = factor("a", c("a", "b")))) +
    geom_point(aes(x, y, color = color)) +
    scale_colour_brewer(palette = "Dark2", drop = FALSE)

Image

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