-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Violin plots with too few observations are broken #3314
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
Comments
This is what I get with #3320. Is this acceptable behavior? library(ggplot2)
ggplot(data.frame(y = 1), aes(factor(1), y = y)) + geom_violin()
#> Warning in max(data$density): no non-missing arguments to max; returning -
#> Inf Created on 2019-05-08 by the reprex package (v0.2.1) |
I can confirm that this was the behaviour in 3.1.1 |
I am using ggplot2 3.2.0 and am experiencing this issue again. It is not clear form the above comments whether the function just requires more data to plot properly. Any thoughts? |
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/ |
The revdep checks (#3303) identified an issue where
geom_violin()
plots with too few observations now fail. In 3.1.1, these plots were rendered with no geometry and no warning. This differs from the behaviour ofgeom_density()
, which issues a warning before dropping a group with too few observations.The text was updated successfully, but these errors were encountered: