Open
Description
Hi,
Thanks for producing this great package. I think I've found a bug that occurs when trying to get ggplotly
to produce error bars. The bug occurs when you try to set a colour aesthetic, at which point ggplotly
removes the error bars. A reprex is below:
library(ggplot2)
library(plotly)
## create data set
data <- data.frame(
x = rep(paste0("G", 1:2), each = 2),
col = rep(paste0("T", 1:2), 2),
mn = 1:4,
LCI = 1:4 - 0.5,
UCI = 1:4 + 0.5
)
## ggplot version (has error bars)
p <- ggplot(data, aes(x = x, colour = col)) +
geom_point(aes(y = mn)) +
geom_errorbar(aes(ymin = LCI, ymax = UCI))
## plotly version (removes error bars)
ggplotly(p)
Many thanks,
TJ