'How to remove whiskers from geom_boxplot() when called from a ggplotly() function

How do I get it so that it returns a box-plot without upper & lower whiskers? When I run this:

a <- ggplot(df1, aes(Name, Values)) + 
  geom_violin(width = 6, alpha = 0.5, trim = FALSE) +
  geom_boxplot(width = 1, fill = "black", colour = "black", alpha = 0.5) +
  geom_jitter(size = 1, alpha = 0.5) +
  stat_summary(fun = mean, geom = "point", shape = 6, alpha = 0.5) + 
  theme(panel.grid.major.x = element_blank(),
        panel.grid.major.y = element_blank(),
        panel.grid.minor.x = element_blank(),
        panel.grid.minor.y = element_blank()) +
  ggtitle(label = "Title of Plot")
a

I get a boxplot without upper & lower whiskers. However when I run this:

ggplotly(a)

I get a boxplot with upper & lower whiskers. I require the plot to be interactive, but I want to remove the upper & lower whiskers. How would I do this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source