Skip to content
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

@jiho
Copy link
Contributor

@jiho jiho commented Nov 21, 2016

No description provided.

@jiho
Copy link
Contributor Author

@jiho 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
Copy link
Member

@hadley hadley commented Nov 21, 2016

Could you please add a bullet to NEWS?

@jiho
Copy link
Contributor Author

@jiho jiho commented Nov 21, 2016

Not sure where. Above # ggplot2 2.2.0?

@hadley
Copy link
Member

@hadley 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
Copy link
Contributor Author

@jiho jiho commented Nov 21, 2016

Done. I squashed everything.

@hadley hadley merged commit 721c2f1 into tidyverse:master Jan 24, 2017
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@hadley
Copy link
Member

@hadley hadley commented Jan 24, 2017

Thanks!

@lock
Copy link

@lock lock bot commented Jan 18, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants