Hi,
I want to hide the outliers in the basic geom_boxplot so that I don’t get duplicate points when I overlay it with a geom_jitter. This is so I can hover over the jitter points and get the point details. I am able to get the plot to render ok with basic ggplot; but it looks like ggplotly ignores the outlier parameter settings resulting in duplicate points. Has anyone else seen this? Any suggestions?
My R version is 3.3.1 (2016-06-21), and the version of plotly is ‘3.6.0’,
Example code with mtcars data set:
library(ggplot2)
library(plotly)
carsbp<-ggplot(mtcars,aes(as.factor(cyl),mpg,col=as.factor(cyl)))+geom_boxplot(outlier.colour=NA)+geom_jitter(aes(text=paste(rownames(mtcars))))+xlab(“cyl”)
#check for no duplicate outliers in ggplot
carsbp
#view with ggplotly, see duplicate at cyl = 8, at 10.4 mpg
ggplotly(carsbp)
Thanks,
Melissa