You probably have to calculate, which points are outside the range by yourself. Here is an extension of the standard example from geom_boxplot
that shows how to find the outliers using plyr
.
# load packages
require(plyr)
require(ggplot2)
# find outliers
df <- ddply(mtcars, "cyl", function(x){
iqr <- quantile(x[,"mpg"], c(.25, .75)) # inter-quartile-range
whisker <- iqr+c(-1.5, 1.5)*diff(iqr) # whiskers-range
x[,"shape"] <- ifelse(x[,"mpg"] < whisker[1] | x[,"mpg"]>whisker[2], 1, 16)
return(x)
})
# plot
p <- ggplot(df, aes(factor(cyl), mpg))
p + geom_boxplot() # without jittering
# adding shape manualy
p + geom_boxplot(outlier.size=-Inf) +
geom_jitter(aes(shape=factor(shape))) +
scale_shape_manual(guide=FALSE, values=c("16"=16, "1"=1))