[R] Trellis Plot

Walmes Zeviani walmeszeviani at yahoo.com.br
Tue Nov 24 13:08:59 CET 2009


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:
> 
> anyone know how to add text in the Trellis plot panel ?? i want to add
> things eg: dot dot dot. in the headrer of the panel.
> 
> eg:  http://old.nabble.com/file/p26486579/hist1.png hist1.png 
> 

-- 
View this message in context: http://old.nabble.com/Trellis-Plot-tp26486579p26494827.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list