I have data that is mostly centered in a small range but there is a significant number of points which are out of this range. I would like to plot a histogram for this data that will focus on the small range but will also show the outliers. Something like a log-scale for the histogram compare to this post
require(latticeExtra)
n<-1000
m<-matrix(c(rnorm(n,240,56),rnorm(n,47,13),rnorm(n,23,7),rnorm(n,8.7,3)),nrow=n)
m<-rbind(m, matrix(c(rnorm(n,385,78), rnorm(n,160,32), rnorm(n,4,.8), rnorm(n,.6,.12)), nrow=n))
grid<-data.frame(ev=m,model=rep(c("A","B"),each=n))
histogram(~c(ev.1,ev.2,ev.3,ev.4)|model
,data=grid
,layout=c(2,1), xlab = "",ylab=""
,type=c("density")
#,par.settings = list(superpose.polygon=list(alpha=c(.5,.5,.5,.5)))
,panel=function(x,subscripts=subscripts,...){
panel.grid()
x<-matrix(x,nrow=n)
panel.histogram(x[,1],...,col=4,alpha=.5)
panel.histogram(x[,2],...,col=2,alpha=.5)
panel.histogram(x[,3],...,col=5,alpha=.5)
panel.histogram(x[,4],...,col=7,alpha=.5)
}
)