[R] lattice panel.abline use

Mikhail Titov mlt at gmx.us
Fri Aug 12 18:47:38 CEST 2011


I hope this helps:

xyplot(val ~ x | type,
       panel=function(...) {
           panel.xyplot(...)
           panel.abline(h=.6)
       })

Mikhail

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
> Behalf Of jjap
> Sent: Friday, August 12, 2011 10:41 AM
> To: r-help at r-project.org
> Subject: [R] lattice panel.abline use
> 
> Dear R-users,
> 
> I am unsuccessful in trying to add an horizontal line to all graphs in the
> example below:
> 
> library(lattice)
> val<-runif(15)
> x<-rep(seq(1:5),3)
> type<-c(rep("a",5), rep("b",5), rep("c",5))
> 
> xyplot(val ~ x | type, panel.abline(h=.6))
> 
> Any hints are appreciated.
> Best regards,
> 
> ---Jean
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/lattice-panel-
> abline-use-tp3739693p3739693.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list