
Hi all,

I am using barchart() to plot values above the bars. When using groups argument we get bars grouped arround a given x level. By placing values above this bars we need to know the respective x coordinates. How can I get it?

require(lattice)
da <- expand.grid(x=1:5, z=1:3, w=1:2)
da$y <- rpois(da$x, lambda=23)

barchart(y~x|w, groups=z, data=da, horizontal=FALSE,
         panel=function(x, y, subscripts, groups, ...){
           panel.barchart(x, y, subscripts=subscripts, groups=groups, ...)
           d <- 0.22 # <------ how obtain "d" or coordinates?
           panel.text(x+c(-d,0,d), y, label=y, pos=3)
         })

Thanks in advance.
Walmes Zeviani, Lavras - MG, Brasil.
 		 	   		  
_________________________________________________________________

os.

dium=Tagline&utm_campaign=InfuseSocial
	[[alternative HTML version deleted]]

