Closed
Description
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()
ggplot(data, aes(Names)) +
geom_errorbar(aes(y = auc, ymin = inf, ymax = sup))
plotly::ggplotly()
Created on 2020-04-23 by the reprex package (v0.3.0)