New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geom_boxplot with continuous x and without group aesthetics #992

Closed
krlmlr opened this Issue Aug 5, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@krlmlr
Member

krlmlr commented Aug 5, 2014

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?

@hadley

This comment has been minimized.

Member

hadley commented Jun 11, 2015

Maaaaybe, but I like that there's currently one unifying principle for grouping (i.e. all discrete variable for a group). But if you feel strongly about, I'd review a PR to add a warning.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.