Skip to content
Prev 201415 / 398506 Next

Trellis Plot

You could try adapt this code:

yy <- c(rnorm(20,2),rnorm(35,3),
rnorm(30,2),rnorm(20,3),rnorm(4,2),rnorm(10,3))
xx <- c(1:20,1:35,1:30,1:20,1:4,1:10)
gg <- rep(c('A','B','A','B','A','B'), c(20,35,30,20,4,10))
pp <- rep(c('Cond 1','Cond 2','Cond 3'), c(55, 50, 14))

#pdf("teste.pdf")
xyplot(yy ~ xx | pp, groups=gg)
 trellis.focus('strip', 1, 1, highlight=FALSE)
  ltext(0, .5, '20', col='red', pos=4)
  ltext(1, .5, '35', col='black', pos=2)
 trellis.unfocus()
 trellis.focus('strip', 2, 1, highlight=FALSE)
  ltext(0,.5,'30',col='red', pos=4)
  ltext(1,.5,'20',col='black', pos=2)
 trellis.unfocus()
 trellis.focus('strip', 1, 2, highlight=FALSE)
  ltext(0,.5,'4',col='red', pos=4)
  ltext(1,.5,'10',col='black', pos=2)
 trellis.unfocus()
#dev.off()

Walmes Zeviani, Brasil.
ychu066 wrote: