You could use the gap.barplot
from the plotrix package.
# install.packages('plotrix', dependencies = TRUE)
require(plotrix)
example(gap.barplot)
or
twogrp<-c(rnorm(10)+4,rnorm(10)+20)
gap.barplot(twogrp,gap=c(8,16),xlab="Index",ytics=c(3,6,17,20),
ylab="Group values",main="Barplot with gap")
Will give you this,
update 2012-05-09 19:15:42 PDT
Would it be an option to use facet_wrap
with "free"
(or "free_y"
) scales
? That way you would be able to compare the data side by side, but have different y scales
Here is my quick example,
library('ggplot2')
source("http://www.ling.upenn.edu/~joseff/rstudy/data/coins.R")
coins$foo <- ifelse(coins$Mass.g >= 10, c("Low"), c("hight"))
m <- ggplot(coins, aes(x = Mass.g))
m + geom_histogram(binwidth = 2) + facet_wrap(~ foo, scales = "free")
The above would give you this,
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…