The following four calls return what seems to be the exact same graph. How can I control the panel density plot? Thank you.
library(lattice)
df <- data.frame( y = runif(100) , p = rep(c('a','b'),50) )
histogram(~ y | p , data = df ,
type = "density",
panel=function(x, ...) {
panel.histogram(x, ...)
panel.densityplot(x, ...)
})
histogram(~ y | p , data = df ,
type = "density",
panel=function(x, ...) {
panel.histogram(x, ...)
panel.densityplot(x, bw=100,kernel="gaussian",...)
})
histogram(~ y | p , data = df ,
type = "density",
panel=function(x, ...) {
panel.histogram(x, ...)
panel.densityplot(x, dargs=list(bw=100,kernel="gaussian"),...)
})
histogram(~ y | p , data = df ,
type = "density", bw=100,kernel="gaussian" ,
panel=function(x, ...) {
panel.histogram(x, ...)
panel.densityplot(x, ...)
})