On Thu, Apr 22, 2010 at 3:16 PM, Giles <gilescr...@verizon.net> wrote: > Thank you Burt Gunter and David Winsemius, > > I confirmed David's comment. > One must use type=c("p","g") > in order to get both the grid and points. > > So, to use densityplot well, > we must be quite aware of the options > for panel.xyplot!
Actually, this works not by design, but due to the specifics of the implementation. For example, you get no grid with densityplot(rnorm(100), type = c("p", "g"), plot.points=FALSE) One should not really be afraid of writing panel functions. All this type= stuff is convenient, but in the end it's just syntactic sugar; in the original Trellis design you could barely do anything beyond the very basics without panel functions. It should not be conceptually that big a leap to write densityplot(rnorm(100), panel = function(...) { panel.grid(h = 0, v = -1) panel.densityplot(...) }) especially as doing so gives you greater control. -Deepayan ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.