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

Fix warning when using weight with stat_bin #1921

Merged
merged 1 commit into from Jan 24, 2017

Conversation

Projects
None yet
2 participants
@jiho
Contributor

jiho commented Nov 21, 2016

No description provided.

@jiho

This comment has been minimized.

Contributor

jiho commented Nov 21, 2016

A warning is emitted although it seems to be doing the right thing.

library("ggplot2")
d <- data.frame(x=c(1,1,2), y=c(1,1,10))
ggplot(d) + geom_histogram(aes(x=x), binwidth=1)
ggplot(d) + geom_histogram(aes(x=x, weight=y), binwidth=1)
Warning: Ignoring unknown aesthetics: weight

geom_bar does not display the problem. This simple commit fixes the warning and seems appropriate.

@jiho jiho force-pushed the jiho:fix/stat_bin_weight branch from 518e9f4 to b76bbdd Nov 21, 2016

@hadley

This comment has been minimized.

Member

hadley commented Nov 21, 2016

Could you please add a bullet to NEWS?

@jiho

This comment has been minimized.

Contributor

jiho commented Nov 21, 2016

Not sure where. Above # ggplot2 2.2.0?

@hadley

This comment has been minimized.

Member

hadley commented Nov 21, 2016

Ooops, forgot to push. Try now

@jiho jiho force-pushed the jiho:fix/stat_bin_weight branch from b76bbdd to 1a60b99 Nov 21, 2016

@jiho jiho force-pushed the jiho:fix/stat_bin_weight branch from 1a60b99 to efb365f Nov 21, 2016

@jiho

This comment has been minimized.

Contributor

jiho commented Nov 21, 2016

Done. I squashed everything.

@hadley hadley merged commit 721c2f1 into tidyverse:master Jan 24, 2017

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@hadley

This comment has been minimized.

Member

hadley commented Jan 24, 2017

Thanks!

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