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

stat_summary_bin()'s defaults #1386

lionel- opened this issue Oct 24, 2015 · 0 comments

stat_summary_bin()'s defaults #1386

lionel- opened this issue Oct 24, 2015 · 0 comments


Copy link

@lionel- lionel- commented Oct 24, 2015

The default geom for stat_summary_bin() is geom_pointrange() and requires y, ymin and ydata aes. I would expect the stat to automatically compute the missing aes, so that the following would work:

g <- ggplot(diamonds, aes(carat, price))
g + stat_summary_bin()
#> Error in seq.default(from = best$lmin, to = best$lmax, by = best$lstep) : 
#>   'from' must be of length 1

Right now we need to explicitly add the argument:

g + stat_summary_bin( = mean_se)

The error message could also be improved when some aes are missing.

@hadley hadley added this to the v1.1.0 milestone Nov 9, 2015
@hadley hadley added the feature label Nov 9, 2015
@hadley hadley closed this in bc2a2a5 Nov 9, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants