Skip to content

geom_errorbar is not rendered unless the y aes is set #1751

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
eliocamp opened this issue Apr 23, 2020 · 0 comments · Fixed by #1779
Closed

geom_errorbar is not rendered unless the y aes is set #1751

eliocamp opened this issue Apr 23, 2020 · 0 comments · Fixed by #1779

Comments

@eliocamp
Copy link

In ggplot2, the only aesthetics needed for geom_errorbar are ymin and ymax. However, ggplotly fails unless I also specify the y aesthetic.

library(ggplot2)
library(plotly)

data <- data.frame(auc=c(0.268707482993197,0.571428571428571), 
                   sup=c(0.407680628614317,0.648343533190079), 
                   inf=c(0.129734337372078,0.494513609667063), 
                   Names = c("Firmicutes","Spirochaetes"))


ggplot(data, aes(Names)) +
  geom_errorbar(aes(ymin = inf, ymax = sup))    

plotly::ggplotly()

image

ggplot(data, aes(Names)) +
  geom_errorbar(aes(y = auc, ymin = inf, ymax = sup))    

plotly::ggplotly()

image

Created on 2020-04-23 by the reprex package (v0.3.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants