I created a facet_grid
with boxplots of multiple variables. To give an example, the graph can be reproduced by following dummy data
require(ggplot2)
require(plyr)
library(reshape2)
set.seed(1234)
x<- rnorm(100)
y.1<-rnorm(100)
y.2<-rnorm(100)
y.3<-rnorm(100)
y.4<-rnorm(100)
df<- (as.data.frame(cbind(x,y.1,y.2,y.3,y.4)))
dfmelt<-melt(df, measure.vars = 2:5)
and creating the resulting graph as
dfmelt$bin <- factor(round_any(dfmelt$x,0.5))
ggplot(dfmelt, aes(x=bin, y=value, fill=variable))+
geom_boxplot()+
facet_grid(.~bin, scales="free")+
labs(x="X (binned)")+
theme(axis.text.x=element_blank())
which gives the following result:
However, I would like to redefine the boxplot whiskers so they don't represent 0.25 - 1.5 IQR / 0.75 + IQR and outliers, but (i) the complete 5th and 95th percentile or (ii) the infinum and supremum of the data.