[R] lattice, panel.grid, and scales=list(tick.number=XXX)

M. K. mk_lists at yahoo.ca
Wed Jun 15 00:36:36 CEST 2005


I have a Lattice plot in which I want to adjust the number of tick
marks used, and I want to have the drawn grid reflect that change. 
Here is what I'm doing:

bwplot(var1 ~ var2, data=df, scales=list(tick.number=10),
       panel=function(...) {
	   panel.grid(h=0,v=-1,...);
	   panel.stripplot(col="gray40", pch="|", cex=2, ...);
	   panel.bwplot(...);
	   })

Unfortunately this doesn't quite work.  Although the bwplot's tick
marks are indeed increased as requested, the panel.grid produces the
same (3 line) grid as before, seemingly unaware of the changed # of
ticks.

Any suggestions on how to achieve what I want?




More information about the R-help mailing list