Skip to content

xyplot and abline

3 messages · Marc Bernard, Brian Ripley, Hadley Wickham

#
On Sat, 17 Sep 2005, Marc Bernard wrote:

            
Use a panel function and call panel.lmline from it. Something like

mypanel <- function (x, y, ...)
{
    panel.xyplot(x,y, ...)
    panel.lmline(x,y, ...)
}

xyplot(y  ~  x| age.cut, xlab="x", ylab="y", panel=mypanel)
#
Try:

xyplot(y  ~  x| age.cut, xlab="x", ylab="y", type=c("p","r"))

Hadley