Skip to content

geom_boxplot with continuous x and without group aesthetics #992

Closed
@krlmlr

Description

@krlmlr
d <- data.frame(x=rep(1:10, 100), y=runif(1000))
ggplot(d) + geom_boxplot(aes(x=x, y=y))

will happily produce a single box, while the intention is probably to produce the output of this code:

d <- data.frame(x=rep(1:10, 100), y=runif(1000))
ggplot(d) + geom_boxplot(aes(x=x, y=y, group=x))

Would a warning be appropriate here -- if x is continuous and the group aesthetics is missing?

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