[R] xyplot and abline

John Charles Considine vinum at iinet.net.au
Thu Sep 22 10:10:48 CEST 2005


How should I pass abline to this function so that I get a reference line
at h=0 in each panel?

sps <- trellis.par.get("superpose.symbol")
sps$pch <- 1:10
trellis.par.set("superpose.symbol",sps)
xyplot(fcast$LOGDIFF~fcast$VINTAGE|fcast$REGION,
       groups=fcast$LAG,
       panel=panel.superpose,
       type="b",mfcol=c(3,5),
       key=list(columns=3, 
         text=list(paste(c("forecast:  ", "",""),
           unique(fcast$LAG), "years")),
       points=Rows(sps,1:3)))

Cheers,

JC




More information about the R-help mailing list