library(lattice)
library(car)
xyplot(income~education|type, data=Duncan,
        aspect="xy",type=c("p","g"),layout=c(1,3),
        xlab = names(Duncan)[3],
        ylab = names(Duncan)[2],
	  main = "Relación entre ingresos y educación",
,
       
       prepanel = function(x, y, subscripts) {
          list(xlim = c(0,100), ylim= c(0,120))
        },
       
 	panel = function(x, y , subscripts,...) {
           panel.xyplot(x, y, cex=0.8,...)
           panel.lmline(x,y,col="red")
           panel.text(x, y, labels=row.names(Duncan),
                      cex = 0.7, pos=3, offset=1, srt=0, adj=c(1,1))
}
) 

