I’m getting a peculiar error regardless of whether I use my data or the plotly example. Looking at the sample data here here:
If you look – the error bars are just the estimate value divided by 10. Not what they actually should be. For instance, running the code:
temp <- ggplot2::mpg %>% group_by(class) %>%
summarise(mn = mean(hwy), sd = 1.96 * sd(hwy))
Source: local data frame [6 x 3]
class mn sd (chr) (dbl) (dbl)
1 2seater 24.80000 2.555527
2 compact 28.29787 7.411975
3 midsize 27.29268 4.186422
4 minivan 22.36364 4.042804
5 pickup 16.87879 4.457588
6 subcompact 28.14286 10.535024
You see that the SD for the subcompact should be +/- 10.53, not the number the plot shows which is 2.814.
After digging in the source code, I found that instead you need to do:
error_y = list(type = "data", array = (your values))
Then it seems to work. However, the website should be updated to show this no?