> In a lattice plot like this: > > win.graph() > xyplot(tmx~frequ|as.factor(as.numeric(spf)),groups=as.factor(blm), > data=tmx,type="l",pch=16,xlab="frequency (N)",ylab="Area held (ha)", > auto.key=list(blm,points=F,lines=T,title="Blm factor",cex.title=0.7, > cex=0.7,corner=c(1,1)),main="Mangroves target=1573ha",layout=c(2,3)) > > I would like to add a horizontal line to each one of the 5 graphs > with a single value, v=1573
Try using a custom panel function, something like: mypanelfn <- function(x,y,...) { panel.xyplot(x=x, y=y, ...) grid.lines(c(0,1), unit(rep(1573, 2), "native") } xyplot(<your params>, panel=mypanelfn) You can also try using llines instead of grid.lines. Regards, Richie. Mathematical Sciences Unit HSL ------------------------------------------------------------------------ ATTENTION: This message contains privileged and confidential inform...{{dropped:20}} ______________________________________________ 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.