On Thu, 2005-09-22 at 10:35 +0200,
Vincent.Duval at bc.boehringer-ingelheim.com wrote:> Use panel.superpose into a panel function
> Here is some changes in your function that should do the work,
> I haven't tried it but at least it should be closed to it,
> HTH
> Vincent
>
Perfect. Thank you.
> Suggestions
> xyplot(fcast$LOGDIFF~fcast$VINTAGE|fcast$REGION,
> groups=fcast$LAG,
> type="b",mfcol=c(3,5),
> panel=function(x,y,...){
> panel.superpose(x,y,...)
> panel.abline(h=0)
> },
> key=list(columns=3,
> text=list(paste(c("forecast: ",
"",""),
> unique(fcast$LAG), "years")),
> points=Rows(sps,1:3)))
>
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of John Charles
> Considine
> Sent: Thursday, September 22, 2005 10:11 AM
> To: r-help
> Subject: [R] xyplot and abline
>
>
> "MMS - ING02 <ing.boehringer-ingelheim.com>" made the
following annotations.
>
===========================================================================>
=> "This e-mail was identified as a newsletter. Please decide if this
e-mail
> is of business relevance, if it is not, please delete it. Thank you".
>
===========================================================================>
=>
> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html