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 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.

@hadley
Copy link
Member

hadley commented Nov 21, 2016

Could you please add a bullet to NEWS?

@jiho
Copy link
Contributor Author

jiho commented Nov 21, 2016

Not sure where. Above # ggplot2 2.2.0?

@hadley
Copy link
Member

hadley commented Nov 21, 2016

Ooops, forgot to push. Try now

@jiho
Copy link
Contributor Author

jiho commented Nov 21, 2016

Done. I squashed everything.

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

hadley commented Jan 24, 2017

Thanks!

@lock
Copy link

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
Development

Successfully merging this pull request may close these issues.

2 participants