Skip to content

geom_violin(draw_quantiles) fails with identical y-values #1641

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

Closed
tklebel opened this issue Jun 2, 2016 · 4 comments
Closed

geom_violin(draw_quantiles) fails with identical y-values #1641

tklebel opened this issue Jun 2, 2016 · 4 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@tklebel
Copy link
Contributor

tklebel commented Jun 2, 2016

Reprex:

mydata <- data.frame(y = rep(1, 10))

ggplot(mydata, aes(x = 1, y)) +
  geom_violin(draw_quantiles = .5)
# Error in stats::approxfun(data$y, data$xminv) : 
# need at least two non-NA values to interpolate

geom_violin without draw_quantiles and geom_boxplot behave correctly in this situation:

ggplot(mydata, aes(x = 1, y)) +
  geom_violin()

@hadley
Copy link
Member

hadley commented Jul 28, 2016

@DanRuderman can you please take a look?

@hadley hadley added bug an unexpected problem or unintended behavior ready labels Jul 28, 2016
@DanRuderman
Copy link
Contributor

Roger roger. Will review by Monday.

@DanRuderman
Copy link
Contributor

Fix pushed and pull requested. Thank you @tklebel for the bug report.

@thomasp85
Copy link
Member

Fixed with #1687

@hadley hadley removed the ready label Aug 12, 2016
@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.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants