Santosh,

continuing with your example, I recommend several functions in the HH
package.

## install.packages("HH") ## needed once, if you don't already have it

require(HH)

tmp <- data.frame(y=rnorm(100),
                  category=rep(factor(letters[1:5]), each=20),
                  level=rep(factor(0:1), length=100))
bwplot(y ~ interaction(level, category), data=tmp, col=c("red","blue"),
       panel=panel.bwplot.intermediate.hh)
tmp$lv <- with(tmp, interaction(level, category))
position(tmp$lv) <- outer(c(-.3,.3), seq(1.5, 9.5, 2), `+`)
bwplot(y ~ lv, data=tmp, col=c("red","blue"),
       panel=panel.bwplot.intermediate.hh,
       scales=list(x=list(at=seq(1.5, 9.5, 2), labels=letters[1:5])))

Rich

	[[alternative HTML version deleted]]

